Find the Maximum Number in a List

Paste numbers in any shape you have them. The largest value appears with the position it occupies, every duplicate tied for first place, the next four behind it, and a list of whatever the parser refused to read.

Maximum value workspace

  • Runs as you type
  • Reads -4.2, 8.4e3, 1,024
  • Skipped tokens are listed, never hidden
0 read

Commas, spaces, tabs, semicolons, pipes and line breaks all work as separators. A column pasted straight out of a spreadsheet needs no cleanup.

Rank by

Magnitude ignores the sign, so -1240 outranks 840. Use it for deviations, errors and anything measured from zero in both directions.

Turn this off when commas separate your values and never group digits. With it off, 1,024 becomes two numbers.

Nothing to rank yet

Type or paste a list on the left. Results update on every keystroke, so there is no button to press.

Finding the largest number is the easy half of the job

One pass down a list, keep whatever beats the current champion, and you have the answer. The arithmetic was never the hard part. What trips people up is everything wrapped around the arithmetic: a stray unit that turned a column into text, a minus sign the spreadsheet exported as a Unicode dash, a value of 1,024 read as two separate numbers, or a maximum sitting three rows below a typo nobody noticed. Those failures are quiet. You still get a number back, and the number looks fine.

So this page reports the work instead of only the result. It shows how many tokens turned into numbers, prints the ones it refused, marks the position the winner occupies, counts duplicates tied for first, and lines up the four values behind it. When the top result is wrong, the reason is usually visible somewhere in that output.

What the parser accepts

Numbers are pulled out token by token after the text is split on whitespace, commas, semicolons, pipes and line breaks. Brackets and quotation marks are stripped first, so a JSON array or a quoted CSV row drops in without editing. Each surviving token has to look like a number on its own, which keeps a header row or a stray label from becoming a silent zero.

You pasteResultWhy
105105Plain integer
-17.25-17.25Sign and decimal point both allowed
8.4e38400Scientific notation, upper or lower case E
1,0241024 or 1 and 24Depends on the thousands toggle
$4,5004500A leading currency mark is dropped
63%63A trailing percent sign is dropped
1.2.3skippedTwo decimal points is not a number
42kgskippedUnits are ambiguous, so the token is reported instead of guessed
−17skippedUnicode minus U+2212, not the ASCII hyphen
NaN, InfinityskippedNot finite, so ranking has no meaning

The last three rows are the ones worth watching. A skipped token count above zero means part of your data never entered the comparison, and the maximum you are reading came from a smaller list than you think.

Position and ties change what the answer means

Two lists share a maximum of 98 and tell opposite stories. In the first, 98 appears once, at row 400 of 400, at the end of a rising trend. In the second, 98 appears eleven times scattered throughout, which is the shape of a sensor pinned against its ceiling rather than a real peak. A bare maximum hides both readings.

Largest value against largest magnitude

Switching the ranking basis changes the answer whenever negatives are present. Ranked by value, the biggest number in -1240, 840, 92 is 840. Ranked by magnitude, the winner is -1240, because its distance from zero is greater. Neither reading is more correct than the other, they answer different questions.

Value ranking suits temperatures, prices, scores, counts and anything where the sign carries direction you care about. Magnitude ranking suits error terms, deviations from a target, latitude offsets, forces along an axis and profit or loss figures where the worst month deserves the same attention as the best. The result card names which basis produced the number so a copied report never loses that context.

Where the arithmetic stops being exact

Every value here becomes an IEEE 754 double, the same 64 bit type your browser uses everywhere else. Two limits follow from that, and both are worth knowing before you trust a result on unusual data.

The maximum is the first place bad data shows up

Outliers and errors both live at the edges of a list, which puts them in exactly the spot this tool reports. Before treating a top value as real, three checks catch most problems.

  1. Compare it against the fifth largest. A winner ten times the size of the value four places behind it is rarely a genuine reading. Missing data written as 9999, a decimal point in the wrong place and a units mismatch all produce that shape.
  2. Look at the skipped list. Numbers dropped for carrying a unit or an unusual dash may include the real maximum, and their absence quietly lowers the answer.
  3. Check the parsed count against the row count you expected. A column of 500 that reports 486 values means fourteen cells never made it into the comparison.

Where this tool stops

Questions about finding a maximum

Parsing rules, ties, negatives and the point where floating point stops being trustworthy.

How do I find the maximum number in a list?

Paste the list into the box on the left. Results appear as you type, with no button to press. The largest value shows at the top of the results panel alongside the position it occupies in your original order, the number of duplicates tied with it, and the four values ranked behind it. Separators do not need cleaning up first, since commas, spaces, tabs, semicolons, pipes and line breaks are all treated as breaks between values.

What happens when the same maximum appears more than once?

Every tied value is counted and highlighted in the chip grid, and the occurrence figure on the result card reports the total. The position shown is the first place the value appears, counting from 1. Repeated maximums on continuous measurements usually mean rounding, a capped sensor or duplicated rows, so the count is worth a look before the number goes into a report.

Does the tool handle negative numbers?

Yes. An ASCII hyphen directly in front of the digits marks a value negative, and a list made entirely of negatives returns the one closest to zero as its maximum, which is the mathematically correct answer. The Unicode minus sign U+2212, which some spreadsheets and PDFs emit, is not the same character and lands in the skipped list. Replace those with a plain hyphen before pasting.

What is the difference between largest value and largest magnitude?

Largest value compares the numbers as they stand, so 840 beats -1240. Largest magnitude compares distance from zero, so -1240 wins. Use value ranking for prices, scores and temperatures where the sign carries meaning. Use magnitude ranking for errors, deviations and any measurement where a large negative deserves the same attention as a large positive.

Why were some of my entries skipped?

A token is skipped when it does not read as a finite number on its own. Common causes are attached units such as 42kg, two decimal points, a Unicode minus sign, thousands separators with the toggle switched off, empty cells and header text pasted along with the data. Every skipped token is printed under the input so you know exactly what was left out rather than guessing why a count looks short.

Can I paste a column straight from Excel or Google Sheets?

Yes. A copied column arrives as one value per line and parses without editing. Currency symbols at the front and percent signs at the end are dropped automatically. Grouped digits such as 1,024 read correctly while the thousands toggle stays on. Cells formatted as text, cells holding formula errors and blank rows are reported in the skipped list.

How large a list will this handle?

Around 100,000 values per run, with anything beyond that truncated and flagged. Lists of a few thousand parse instantly. The chip grid draws at most 400 badges to keep the page responsive, while the maximum, the ranking and every statistic are calculated across everything read, not across the visible badges.

Are very long numbers safe here?

Not past 9,007,199,254,740,991. Above that limit JavaScript doubles round to the nearest value they represent, so a 20 digit identifier changes as it parses and two different IDs merge into one. A warning appears above the results when your list crosses that threshold. For long identifiers, sort as text rather than comparing as numbers.

Is my data uploaded anywhere?

No. Parsing, ranking and the statistics all run inside your browser tab. The page makes no network request after loading, and disconnecting your connection leaves every feature working. Nothing persists between visits, so reloading the page clears the list.