🔢 Number Sorter
By ToolNimba Editorial Team · Updated 2026-06-19
Enter numbers above to sort them.
This number sorter puts any list of numbers in order, smallest to largest or largest to smallest, using a true numeric sort. Paste numbers separated by commas, spaces, tabs, or new lines, choose the direction, and read off the sorted list along with the count, sum, minimum, and maximum. You can also strip out duplicate values and copy the clean result with one click.
What is the Number Sorter?
Sorting numbers means arranging them so each value is no smaller (ascending) or no larger (descending) than the one before it. It sounds trivial, but the catch is that many tools sort numbers the way they sort words, character by character, which is called lexicographic or alphabetical order. Lexicographic order would place 100 before 9, because the character '1' comes before '9'. A numeric sort compares the actual values, so 9 correctly comes before 100. This tool always uses numeric comparison, so negatives, decimals, and large numbers all land in the right place.
The tool accepts a flexible mix of separators. You can paste a comma-separated row from a spreadsheet, a space-separated line, a column with one number per line, or a messy combination of all three, and it will still pick out every number. Each token is checked: if something is not a valid number, you get a clear message telling you exactly which value to fix, rather than a silently wrong result. Plain integers, decimals such as 3.14, and negatives such as -5 are all understood.
Alongside the sorted list you get four quick statistics. Count is how many numbers you entered, sum is their total, and minimum and maximum are the smallest and largest values, which after sorting are simply the two ends of the list. These summaries are calculated on the full set of numbers you typed, before any duplicates are removed, so the sum and count always reflect your original input. Removing duplicates only changes the visible sorted list, which is handy when you want a clean set of distinct values to copy elsewhere.
When to use it
- Putting a column of figures copied from a spreadsheet or document into order before you analyse them.
- Finding the highest and lowest value in a list quickly without scanning it by eye.
- Cleaning a list down to its distinct values by sorting and removing duplicates in one step.
- Checking your own sorting answer in a maths or programming exercise where numeric (not alphabetical) order matters.
How to use the Number Sorter
- Paste or type your numbers, separated by commas, spaces, tabs, or new lines.
- Choose ascending (smallest first) or descending (largest first) order.
- Tick "Remove duplicate values" if you only want each distinct number once.
- Read the sorted list plus the count, sum, minimum, and maximum, then press Copy.
Formula & method
Worked examples
Sort the list 12, 3, 45, 7, 100 in ascending order and read the summary stats.
- Numbers parsed: 12, 3, 45, 7, 100
- Numeric ascending sort: 3, 7, 12, 45, 100 (note 100 stays last, a numeric sort, not 100 before 12)
- count = 5
- sum = 3 + 7 + 12 + 45 + 100 = 167
- minimum = 3 (first value), maximum = 100 (last value)
Result: Sorted: 3, 7, 12, 45, 100 with count 5, sum 167, min 3, max 100
Sort 8, -2, 8, 3.5, -2 in descending order with duplicates removed.
- Numbers parsed: 8, -2, 8, 3.5, -2
- Stats use all 5 values: count = 5, sum = 8 + (-2) + 8 + 3.5 + (-2) = 15.5
- minimum = -2, maximum = 8
- Descending numeric sort: 8, 8, 3.5, -2, -2
- Remove duplicates, keeping the first of each: 8, 3.5, -2
Result: Sorted distinct list: 8, 3.5, -2 with count 5, sum 15.5, min -2, max 8
Numeric order versus alphabetical (lexicographic) order for the same list
| Input list | Numeric ascending (this tool) | Alphabetical order (wrong for numbers) |
|---|---|---|
| 2, 10, 1, 21 | 1, 2, 10, 21 | 1, 10, 2, 21 |
| 5, 100, 9, 50 | 5, 9, 50, 100 | 100, 5, 50, 9 |
| -3, 0, -10, 7 | -10, -3, 0, 7 | -10, -3, 0, 7 |
Common mistakes to avoid
- Relying on alphabetical sorting for numbers. A spreadsheet or text editor set to text sort will place 100 before 9 because it compares characters left to right. Always use a numeric sort for numbers. This tool does that automatically.
- Forgetting that negatives are smaller than zero. In ascending order -10 comes before -3, which comes before 0. It is easy to think -10 is larger because 10 is larger, but a bigger negative is a smaller number.
- Mixing in stray text or symbols. A trailing unit like "5kg" or a currency sign like "$5" is not a plain number, so it cannot be sorted. Strip non-numeric characters first, or the tool will flag the value so you can fix it.
- Expecting the sum to change after removing duplicates. The count and sum here describe every number you entered. Removing duplicates only trims the visible sorted list, it does not recompute the totals, so they keep reflecting your original input.
Glossary
- Ascending order
- Arranged from the smallest value to the largest, so each number is greater than or equal to the one before it.
- Descending order
- Arranged from the largest value to the smallest, so each number is less than or equal to the one before it.
- Numeric sort
- Ordering numbers by their actual value, so 9 comes before 100, rather than by their text.
- Lexicographic order
- Sorting values like words, character by character, which puts 100 before 9 and is wrong for numbers.
- Duplicate
- A value that appears more than once in the list. Removing duplicates keeps only the first occurrence of each distinct value.
Frequently asked questions
How do I sort numbers in ascending or descending order?
Paste your numbers into the box, pick ascending (smallest first) or descending (largest first), and the sorted list appears instantly. You can separate the numbers with commas, spaces, tabs, or new lines.
Does this sort numbers numerically or alphabetically?
Numerically. It compares the actual value of each number, so 9 comes before 100 and -10 comes before -3. Plain alphabetical sorting would wrongly place 100 before 9, which this tool avoids.
Can it handle decimals and negative numbers?
Yes. Decimals such as 3.14 and negatives such as -5 are parsed and sorted correctly. A larger negative like -10 is treated as smaller than -3, which is how numbers actually order.
What separators can I use between numbers?
Commas, spaces, tabs, semicolons, and new lines all work, and you can mix them freely. This lets you paste a spreadsheet row, a single line, or a full column without reformatting it first.
How does removing duplicates work?
Tick the remove duplicates option to keep only the first occurrence of each distinct value in the sorted list. The count and sum still reflect every number you entered, so only the visible list changes.
Is my data sent anywhere?
No. All sorting and calculation happen in your browser using plain JavaScript. Nothing you type is uploaded or stored, so it is safe to use with private figures.