Number Sorter
Sort a list of numbers in ascending or descending order. Optionally remove duplicates. Shows count, min, max, sum, mean, and median.
Did this tool work for you?
How to use this calculator
- 1
Paste or type your numbers in the text area — separate them with commas or new lines.
- 2
Choose ascending or descending sort order.
- 3
Optionally remove duplicates using the third dropdown.
- 4
The sorted list, count, min, max, sum, mean, and median are shown instantly.
Frequently asked questions
Which separators can I use between numbers?
Commas, semicolons, spaces, tabs and line breaks all work, alone or mixed together. “12 5 5 -3 8.5 7” is read the same way as one number per line. Anything that is not a valid number is left out, and the results include a count of those ignored entries so a typo does not go unnoticed.
Why does 1,000 turn into 1 and 0?
The comma is always a separator, so thousands separators are not supported. Entering “1,000, 2” is read as 1, 000 and 2, giving the sorted list 0, 1, 2. Remove thousands commas before pasting. Likewise, a decimal comma as used in much of Europe, such as 2,5, is read as two numbers; use a decimal point.
Is the sort numeric or alphabetical?
Numeric. 9 comes before 10, which a text sort would get wrong. Negative numbers sort below zero and decimals are placed by value. The sorted list shows each number the way it was parsed, so “007” appears as 7.
What happens when I remove duplicates?
Duplicates are removed first, and then the sort and every statistic are computed on the reduced list. For 12 5 5 -3 8.5 100 7 sorted descending, one duplicate is dropped and the result is 100, 12, 8.5, 7, 5, −3 with a count of 6, a sum of 129.5 and a median of 7.75. With duplicates kept, the repeated 5 would count twice in the mean and median.
How is the median calculated for an even count?
The two middle values of the sorted list are averaged. The six numbers above have 7 and 8.5 in the middle, so the median is 7.75. With an odd count, the middle value is returned unchanged.
Which notations does it accept besides plain numbers?
It uses the browser’s number parsing, so scientific notation such as 1e3 is read as 1000 and hexadecimal such as 0x10 is read as 16. This can surprise you if a list contains codes or identifiers that happen to look like these. Infinity and NaN are ignored.
Is there any limit on how long the list can be?
The calculator sets none. Statistics are displayed rounded to six decimal places, while the sorted list itself keeps each value as parsed. Extremely long lists will be limited by what your browser can handle.
Number sorter — order a list from smallest to largest, or the reverse
What you get back
Paste a list, pick ascending or descending, and choose whether to keep or remove duplicates. The output is the ordered list plus count, minimum, maximum, sum, mean and median. If any entries could not be read as numbers, the number ignored is reported, so you know the totals reflect everything you intended.
| You type | It is read as |
|---|---|
| 8.5 | 8.5 |
| -3 | −3 |
| 1,000 | Two numbers: 1 and 0 |
| 1e3 | 1000 |
| 0x10 | 16 |
| abc | Ignored and counted |
Worked example: descending with duplicates removed
The entries 12 5 5 -3 8.5 abc 100;7 contain a text token and a repeated 5. Sorted descending with duplicates removed, the calculator returns 100, 12, 8.5, 7, 5, −3. The count is 6, the sum is 129.5, the mean is 21.583333 and the median is 7.75. It also reports one duplicate removed and one entry ignored.
Worked example: why the mean and median diverge
The list 4, 1, 1, 9, 1 sorted ascending with duplicates kept gives 1, 1, 1, 4, 9. The sum is 16 and the mean is 3.2, but the median is 1, because three of the five values equal 1. Removing the duplicates here would leave 1, 4, 9, which has a median of 4, so the choice of keep or remove changes the statistics and should match what your data means.
Practical uses
Sorting is the first step toward spotting outliers, finding percentiles by hand, checking a list for gaps and ranking scores. Removing duplicates is useful for a quick count of distinct values, since the count after removal equals the number of unique entries. For data copied from a spreadsheet column, paste directly; line breaks are treated as separators.
Preparing your data
Strip thousands separators and use a decimal point before pasting. Remove units and currency symbols, because a token such as 12kg is not a number and will be ignored. If the ignored count is not zero, scan the input for stray letters or symbols rather than assuming the list is complete. The same habit helps with copied tables, where a header row or a footnote marker can sneak in and silently change the count.
Learn more from an authoritative source:
WikipediaFactor Calculator
Find all factors, factor pairs, prime factorization, and the total number of factors for any positive integer.
Half-Life Calculator
Calculate remaining quantity, time elapsed, or half-life for radioactive decay or any exponential decrease. N = N₀ × (1/2)^(t/t½).
Completing the Square Calculator
Convert a quadratic ax²+bx+c to vertex form a(x−h)²+k, find the vertex (h, k), and calculate real roots if they exist.
FOIL Method Calculator
Expand the product (ax+b)(cx+d) using the FOIL method with step-by-step working. Shows First, Outer, Inner, and Last terms separately.
Golden Ratio Calculator
Calculate all three values of a golden ratio division — short side a, long side b, and total length a+b — given any one of them. φ ≈ 1.6180339887.
Pascal's Triangle Calculator
Generate up to 20 rows of Pascal's Triangle and display the nCr (combination) values for any selected row.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →