Checking decimal and thousands punctuation in a numeric list
In the statistics tools on this site a comma separates values. It is not a decimal mark and not a thousands separator, so 12,5 is two numbers and 1,000 is also two numbers.
How the list parser reads commas
The parser splits the input at each comma and turns every piece into a number. Input 12,5 therefore becomes the two values 12 and 5, and the mean is 8.5. Input 12.5 stays a single token with a decimal point, so the list has one value and its mean and median are both 12.5. Input 1,000 becomes 1 and 0, with a mean of 0.5. The three cases on the page show these results, and the last is the surprising one for anyone used to writing a thousand with a comma. The parser does no guessing: it does not look at the position of the comma or at how many digits follow. A comma after exactly three digits looks like a grouping mark to a human reader, and the parser treats it exactly like any other separator. That consistency is useful, since you can predict the count of values by counting commas and adding one, but it leaves all interpretation of the digits to you.
Decimal commas around the world
Many countries write a decimal comma, including Germany, France, Spain, Italy, Brazil and Russia, and write grouping with a period, a space or an apostrophe. The 8th and 9th editions of the SI Brochure from the BIPM state that the decimal marker may be either a point or a comma on the line, and that digits can be grouped in threes with a thin space and without a comma or point. A reader in Berlin who writes 12,5 means twelve and a half. Data copied from a European spreadsheet or report can therefore contain commas that mean decimals, and pasting it unchanged gives a list with twice as many numbers as intended.
How wrong the result can be
Mistakes of this kind do not trigger an error, which is what makes them risky. The text 12,5 produces a valid mean of 8.5 where the intended value was 12.5. A list such as 3,5 4,2 6,1, meant as three decimal numbers separated by spaces, would split at the commas into pieces that may or may not parse. A figure like 1,234 returns two values, 1 and 234, with a mean of 117.5 and a median of 117.5, whereas the intended single number was one thousand two hundred thirty-four. Such results look reasonable on screen, so the only protection is checking the count of values the tool reports against the number you meant to enter.
Convert before pasting
The reliable fix is to normalize the numbers at the source. If the data use a decimal comma, replace each decimal comma with a point and then use commas, line breaks or whatever separator the tool accepts between values. If the data use thousands separators, remove them, so 1,234,567 becomes 1234567. A spreadsheet can do this by changing the cell format or using find and replace on a copy of the column, but be careful that the replace does not hit both kinds of comma in a column that mixes styles. Work on a copy, and compare a few converted values with the originals by eye before copying the whole column.
When the source uses both marks
Some numbers contain both: 1.234,56 in German style means one thousand two hundred thirty-four and fifty-six hundredths, and 1,234.56 in US style means the same quantity. A script has to know which convention applies, because 1.234 alone is ambiguous between a decimal with three places and a grouped thousand. Context settles it: the locale of the source system, the column header, or the digits after the mark. For tabular exports, ask for the locale setting used when the file was written. Where the format cannot be determined, treat the data as unresolved and contact the owner, instead of choosing a convention and hoping.
Using the tool as a check
The tools on this site report the count of values read, and that count is a quick audit. If you paste a column of ten prices and the count says twenty, a decimal comma is the likely cause. Entering a single tricky value, such as 12,5, and reading the mean also reveals how the parser sees it, which is how the first case on the page was set up. Compare the count with the number of rows in the source before trusting the mean, median or any other result. This costs a second and catches most separator errors.
Beyond commas: other punctuation
The same care applies to other characters. A percent sign, a currency symbol, a unit suffix or a footnote marker can stop a token from parsing as a number, and a minus sign written as a typographic dash may fail too. Scientific notation such as 1e3 is a valid number token and means 1000, which is a different case from the comma. Spaces used as grouping marks, as the SI style recommends, are another trap: a value written 12 345 may be read as two tokens or rejected, depending on the tool. Delete the internal space first so the number is one run of digits. Keep the entry to digits, an optional minus sign, a decimal point and an optional exponent, and one separator between values. When the data come from a document or a web page, copy them through plain text first, because formatted copies can carry hidden characters.
Mixed lists and repair examples
Real exports mix conventions. Imagine a column pasted as 1.200,50 and 980,00 and 15,5. The first token contains a period and a comma, and the parser would split it at the comma into 1.200 and 50, giving a value of 1.2 followed by 50, which is silent damage. To repair such a column, first remove the thousands periods, giving 1200,50 and 980,00 and 15,5, and then turn each decimal comma into a point, giving 1200.50, 980.00 and 15.5. The list 1200.5, 980 and 15.5 then has three values with a mean of about 732.0, and the count confirms that nothing was split. Doing the repair in this order matters, since swapping the steps would replace the periods wrongly.
Comma conventions and the parser
The three examples describe how this parser treats commas, and they do not argue that one punctuation convention is better than another. A decimal comma is standard in many countries and is recognized by the SI Brochure. The calculator's convention is a design choice that keeps list parsing simple and predictable. The sensible reading is that the input format is documented, so your data must be adapted to it before you rely on a result.
Reproduce the checks
Comma-separated pair
Open the Mean Median Mode Calculator and enter:
- Numbers
12,5
Expected output:
Mean
8.5Median
8.5The comma creates two observations.
One decimal value
Open the Mean Median Mode Calculator and enter:
- Numbers
12.5
Expected output:
Mean
12.5Median
12.5The decimal point remains inside one token.
Grouped-looking input
Open the Mean Median Mode Calculator and enter:
- Numbers
1,000
Expected output:
Mean
0.5Median
0.5The parser sees one and zero.
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