Checking modes when numbers use different textual spellings
The mean, median and mode tool counts numeric values, not the characters you typed. The tokens 1, 1.0 and 1e0 are the same number and add up to one mode.
Parsing happens before counting
The tool first converts every token to a number and only then computes the mean, median and mode. The tokens 1, 1.0 and 1e0 all parse to the value one, so the list 1, 1.0, 1e0, 2 is the same as 1, 1, 1, 2 from the point of view of the statistics. The value one appears three times and two appears once, so the mode is 1. The sum is 5 over 4 values, a mean of 1.25, and the sorted middle two values are both 1, so the median is 1. The second case on the page feeds the tool the canonical spelling 1,1,1,2 and gets the same three answers, which is the control confirming that spelling has no influence.
Why equal numbers have many spellings
A decimal number can be written in many ways. Trailing zeros after the decimal point do not change the value, so 1.0 and 1.00 equal 1. A leading plus sign, leading zeros and exponent notation also give alternative spellings: 0.5, .5 and 5e-1 are all one half. Programming languages and data formats accept different subsets of these. The IEEE 754 binary64 format, used by JavaScript and many other languages, stores each value as a 64-bit pattern that does not remember the original text. Two tokens that parse to the same bit pattern are equal in every later comparison, and counting for the mode relies on that equality.
A second example with fractions
Consider the list 0.5, 5e-1, 1. The first two tokens are both one half, so the parsed list is 0.5, 0.5, 1. The mean is 2/3, about 0.6667, the median is 0.5 and the mode is 0.5. A reader who counted spellings would see three distinct tokens, find no repeats and conclude there is no mode. The tool reports a mode because the numeric values repeat. This is the correct behavior for measurements, where 0.5 and 5e-1 differ only in notation and the person who typed them had one value in mind.
Where binary floating point interferes
There is a caveat that the page does not hide. Equality is exact on the stored binary value, and many decimal fractions are not exactly representable. The sum 0.1 + 0.2 produces 0.30000000000000004 in binary64, which differs from the number written 0.3. This matters when values in a list come from computations. Two values that are equal on paper may differ in the last bit and then count as different values. Tokens typed directly, such as 0.3 twice, both parse to the same bit pattern and match. If your data came out of calculations, round them to a fixed number of decimals before looking for a mode. A rounding step to two or three decimals removes the last-bit noise and makes repeated results match, at the price of treating values closer than the rounding step as the same. Choose the step from the precision of the instrument that produced the numbers.
Modes with ties and no repeats
The mode is the most frequent value, and a list can have several. For 1, 1, 2, 2, 3 both 1 and 2 are modes, each appearing twice. When every value appears once, the tool follows its stated rule, listing modes as repeated maximum-frequency values, so a list without repeats has no mode to report. For continuous measurements such as heights or temperatures, repeats are unusual and the mode is not informative unless values are rounded or binned. For counts, ratings and categories coded as numbers, the mode is more meaningful, and its value is the first thing to check against the numeric spellings in your data. A rating survey with answers 4, 4.0, 5 and 4e0 has the mode 4 with three of four responses, whichever way each respondent's entry was typed, and the mean of 4.25 follows from the same parsed values.
When spelling is meaningful
Some data are labels that happen to use digits. Product codes, ZIP codes and badge numbers carry meaning in their exact spelling: 007 and 7 are different identifiers, and 1e5 could be a code and not the number 100000. Feeding such values to a numeric tool erases the difference, and a mode of such a column answers a question about parsed numbers, not about codes. For labels, count the strings as strings, using a text-based method or a spreadsheet pivot table on a text column. The numeric tool is the right choice only when the digits stand for quantities.
Contrast with the JSON formatter
Not every tool in the site treats numbers this way. The JSON validator and formatter works on the text of a document, and it can preserve the spelling of a number token so that an exact round trip is possible. A document containing 1.0 can come out of it with 1.0 intact. The statistics tool exists to calculate, so it discards the spelling. The two behaviors serve different jobs, and understanding which one a tool follows prevents surprises. Pasting a list into both tools and comparing the output is a quick way to see the difference for yourself, and it takes only a few seconds. Typical surprises are a trailing zero vanishing in a report or two spellings being counted as one category.
Checking a list before trusting the mode
A short routine avoids most surprises. First, count the tokens and compare with the number of values you meant to enter. Second, scan for tokens that are suspicious, such as ones with stray symbols or very long digit strings. Digit strings longer than 15 or 16 significant digits exceed the precision of a double, so two different long identifiers can parse to the same number and wrongly form a mode. Third, decide whether duplicates you expect are exact repeats of typed values or the result of earlier arithmetic. Finally, run the canonical spelling of a small sample through the tool, as the second case does, and confirm the summaries agree. If they do, spelling is not the cause of any difference.
What the cases show
The two cases show that this tool gives identical mean, median and mode for equivalent numeric spellings. They do not show how it handles invalid tokens, very long digit strings beyond the precision of a double, or locale-specific punctuation, which is covered on a separate page about commas. If your list mixes data types, first decide whether you are analyzing numbers or labels, then use a method that matches.
Reproduce the checks
Equivalent numeric spellings
Open the Mean Median Mode Calculator and enter:
- Numbers
1,1.0,1e0,2
Expected output:
Mean
1.25Median
1Modes
1The parsed number one appears three times.
Canonical numeric control
Open the Mean Median Mode Calculator and enter:
- Numbers
1,1,1,2
Expected output:
Mean
1.25Median
1Modes
1The canonical tokens give the same numeric summaries.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- Primary definition and convention reference ↗ · 2026-10-08