Number Sorter
This number sorter puts a list of numbers into numeric order, which sounds trivial until you notice that most tools get it wrong. Sorting as text — the default behaviour of many spreadsheet columns and of JavaScript sort with no comparator — compares character by character, so 10 comes before 9 and 100 before 2. Here the comparison is genuinely numeric, and negatives and decimals are handled correctly. The sum, mean, median, minimum and maximum are calculated alongside, so pasting a column of figures gives you its summary without opening a spreadsheet. Anything that is not a number is skipped and counted rather than silently ignored.
How it works
Sorts a list of numbers properly. Sorting them as text — which is what most tools and most default sort functions do — puts 10 before 9 and 100 before 2, because it compares character by character.
The sum, mean, median, minimum and maximum are calculated alongside, so a pasted column of figures gives you its summary without a spreadsheet.
Everything runs in your browser — nothing you enter is sent to a server.
⚠No numbers were found. Separate them with spaces, commas or line breaks.
Why text sorting gets it wrong
Sorting [9, 10, 100, 2] as text compares the first character of each: "1" beats "2" and "9" comes
last. The result is [10, 100, 2, 9] — correct alphabetical order, useless numerical order.
This catches people out constantly, because it is the default behaviour of Array.sort() with no
comparator and of any spreadsheet column typed as text.
The statistics
- Mean — the total divided by the count. Sensitive to outliers.
- Median — the middle value once sorted. Far more robust when one figure is wildly out of line.
- Minimum and maximum — the range, which is often the first thing worth knowing.
When mean and median are far apart, the distribution is skewed — usually a sign that one or two large values are dominating the average.
Frequently asked questions
How do I sort numbers?
Paste them separated by spaces, commas or line breaks. They are sorted numerically and the summary statistics appear below.
Why do other tools sort 10 before 9?
Because they sort as text, comparing character by character — "1" comes before "9". This tool compares the values themselves, so the order is correct.
Are decimals and negatives handled?
Yes. Both sort correctly, and both are included in the sum, mean and median.
What statistics are shown?
Count, sum, mean, median, minimum and maximum. The median is the middle value, or the average of the two middle values when the count is even.
What happens to non-numbers in my list?
They are skipped and counted, and the count is reported — so you know something was left out rather than wondering why the total looks wrong.
Is my data uploaded?
No. Sorting and the statistics run entirely in your browser.
Related tools
Line Sorter & Deduplicator
Sort lines alphabetically, numerically, or randomly, and remove duplicate lines in one click.
Random Number Generator
A random number generator for cryptographically secure integers in any range, one at a time or in bulk, with optional no-repeats.
Percentage Calculator
A percentage calculator for three everyday calculations: X% of Y, X as a percent of Y, and percentage change between two numbers.