The number sorter above takes a list in whatever untidy shape you already have it — comma separated, one per line, copied out of a spreadsheet column, or a mixture of all three — and returns it in true numeric order. Its distinguishing feature is that it does not insist every entry be a plain decimal. A fraction, a percentage and an ordinary integer can sit in the same list, and the tool compares their actual values rather than their spelling.
Arb Digital publishes free browser tools that do one job precisely and explain what they did. That matters more than it sounds for sorting, because the single most common failure in this area is silent: a tool sorts as text, produces a list that looks plausible, and quietly puts 100 before 9. This page tells you exactly how it parsed every entry and how many it could not read.
What This Number Sorter Does
Paste any list. The tool splits it on commas, spaces, semicolons, tabs and line breaks, so you do not have to normalise the separators first. Each token is then parsed into a numeric value: -7 becomes −7, 4.5 becomes 4.5, 3/4 becomes 0.75, 25% becomes 0.25, and 1.2e3 becomes 1,200. One consequence of accepting the comma as a separator is that it cannot also serve as a thousands mark: 1,250 is read as two values, 1 and 250. Strip thousands separators before pasting, or paste one value per line.
Once parsed, the list is sorted numerically in the direction you choose. You can print the result exactly as you typed it — so 3/4 comes back as 3/4, sitting in the position 0.75 belongs in — or convert every entry to a decimal for a uniform column. Alongside the sorted list you get the count, the smallest and largest values, and the median, which is the value in the middle once the list is in order and is therefore free to compute at this point.
Anything the parser cannot read is not silently dropped. The count of unreadable tokens is reported under the result, so a stray heading row or a currency symbol shows up as a warning instead of vanishing.
How to Use It
- Paste or type your list into the box. Separators do not need to be consistent.
- Choose ascending for least to greatest, or descending for greatest to least.
- Pick an output separator — comma, space, pipe, or one value per line if you are pasting the result back into a spreadsheet column.
- Decide whether repeated values should be kept or removed. Removal is by numeric value, so 0.5 and 1/2 are treated as the same number.
- Read the sorted list from the output box, and check the count of unreadable tokens before you trust it.
The Formula / How It's Calculated
There is no formula in the usual sense, but there is a precise procedure, and it is worth stating because the order of the steps is what makes the answer correct.
First, tokenise: split the input on , ; whitespace and discard empty tokens. Second, parse each token to a number. A token matching a/b becomes a ÷ b. A token ending in % becomes the leading number divided by 100. Everything else is read as a plain decimal or scientific-notation number. Third, sort the parsed pairs by their numeric value, using a comparison of value A minus value B — never a string comparison. Fourth, print either the original token or its decimal, in that new order.
Work through the default list: 10, 2, 33, 4.5, 3/4, 25%, -7. Parsed, those are 10, 2, 33, 4.5, 0.75, 0.25 and −7. In ascending order that is −7, 0.25, 0.75, 2, 4.5, 10, 33 — which the tool prints back in your original notation as -7, 25%, 3/4, 2, 4.5, 10, 33. Seven values, smallest −7, largest 33. With seven values the median is the fourth, which is 2.
If the list had an even count — say the same list without the −7 — the median is the mean of the two middle values. Ordered, those six are 0.25, 0.75, 2, 4.5, 10, 33; the two middle values are 2 and 4.5, so the median is (2 + 4.5) ÷ 2 = 3.25. That is the rule the tool applies, and it is the same convention used by the five number summary calculator.
Why Text Sorting Gets Numbers Wrong
Nearly every general-purpose sort in computing defaults to comparing text, and the result is confidently wrong for numbers. JavaScript is the clearest example: MDN's documentation for Array.prototype.sort() states that without a comparison function, elements are converted to strings and compared by UTF-16 code unit, and gives the worked example that [1, 30, 4, 21, 100000] sorts to [1, 100000, 21, 30, 4].
The reason is that text comparison works character by character. "100000" and "21" are compared at their first character only: "1" is lower than "2", so 100,000 is placed before 21 and the comparison stops there. The same logic explains why "9" lands after "10" and after "1000". It is not a bug in the sort; it is the sort answering a different question from the one you asked.
Negative numbers make it worse. As text, the minus sign is just a character, and "-7" is compared against "10" by comparing "-" against "1". Fractions and percentages are hopeless as text, because "3/4" and "25%" have no numeric interpretation at all at the character level. Every one of those cases is handled here by parsing to a value before comparing, which is the whole point of the tool.
Sort stability is a related idea worth knowing. Python's Sorting Techniques guide explains that a stable sort preserves the original order of records that compare equal, which is what lets you build a multi-level sort out of successive single-level sorts. This page's sort is stable too, so if the same value appears twice in different notation — 0.5 and then 1/2 — they come out in the order you typed them rather than being shuffled.
How This Differs From Our Text Line Sorter
Arb Digital already publishes a sort text lines tool, and the two do not do the same job. That tool works on whole lines of text: it offers A–Z, Z–A, shortest first, longest first, reverse, and a numeric mode that pulls the leading number off each line. Its unit of work is the line, and everything after that leading number is carried along for the ride.
This page's unit of work is the individual number. It splits on commas and spaces as well as line breaks, it understands fraction and percentage notation, it deduplicates by numeric value rather than by text, and it reports the count, range and median of the set. If you have a list of labelled rows to reorder, the line sorter is the right tool. If you have a bag of loose numbers in mixed notation, this one is.
Mixed Notation, and Where It Bites
Comparing across notations is where people make arithmetic errors by hand, and it is worth being explicit about what the tool assumes. A percentage is interpreted as a proportion: 25% is 0.25. That is the mathematically standard reading, and it is correct when your list is a set of proportions. It is not what you want if your list is a column of percentage scores where 25% simply means the number 25 — in that situation the tool will place every percentage below every whole number, which is arithmetically right but probably not what you meant. Strip the percent signs first if the values are scores rather than proportions.
Fractions are read as a division, so 7/2 is 3.5 and -3/4 is −0.75. Mixed numbers written with a space, such as 1 1/2, cannot be read reliably here because a space is also a separator — the tool would see 1 and 1/2 as two values. Write them as improper fractions instead: 3/2. If you need to convert between the two forms, the mixed number calculator handles that arithmetic directly.
A fraction with a zero denominator is not a number and is counted as unreadable rather than being placed anywhere in the order. Dates, currency symbols and units attached to the number are also rejected, deliberately: guessing that "$4.50" means 4.5 would mean also guessing about "4/5/2026", and a parser that guesses is a parser you cannot check.
Where Sorting a List Is Actually the Job
Ordering a set of values is usually a step rather than an end. Putting exam marks in order is how you find the median and the quartiles. Ordering measurements is how you spot the outlier at each end. Ordering prices is how you find the range you are actually choosing within, rather than the average, which can hide a wide spread.
Ordering is also the fastest way to find duplicates: identical values become adjacent, which is why the remove-duplicates option here works on the sorted list. And it is how you sanity-check a data paste — if a value you expected to be near the top has landed at the bottom, you have almost certainly got a stray character in that cell.
If you need a list of numbers to sort in the first place, the random number generator will produce one. If you want the sorted values written out in English, the number to words converter does that, and the prime number checker answers a different question about each value individually.
Arb Digital designs and builds free interactive tools that do one job properly, explain their method, and earn links because people keep coming back to them. Browse what we have already published, or tell us what your audience keeps searching for.
Browse the Free Tools Hub Talk to Arb DigitalCommon Mistakes to Avoid
- Trusting a spreadsheet column that is stored as text. Numbers imported as text sort alphabetically even in a spreadsheet. Convert the column to a number format before sorting, or paste it here instead.
- Leaving percent signs on scores. A score of 25% is read here as 0.25. That is correct for proportions and wrong for marks out of a hundred. Decide which you have before you sort.
- Writing mixed numbers with a space.
1 1/2splits into two values. Write3/2. - Ignoring the unreadable count. If the tool says three tokens could not be parsed, your sorted list is missing three values. Find them before you use the result.
- Taking the median from an unsorted list. The median is defined on the ordered list. Sorting first is not optional, and with an even count it is the mean of the two middle values, not either one of them.
Related Free Tools From Arb Digital
For whole lines rather than loose numbers, use the sort text lines tool. Once the list is ordered, the five number summary calculator gives the quartiles and the interquartile range, and the mixed number calculator converts between improper fractions and mixed numbers. To generate a test list, try the random number generator; to write values out in words, the number to words converter; and to test individual values, the prime number checker. Everything else is on the free online tools hub.
Frequently Asked Questions
Compare the numeric values, not their text. Paste the list above and choose ascending: the tool parses each entry to a number first, then orders by value, so 9 is placed before 10 and −7 before 0.
Yes. A fraction such as 3/4 is evaluated as 0.75 and placed among the decimals accordingly. You can print the result in your original notation or convert everything to decimals.
A percentage is read as a proportion, so 25% is 0.25. That is right for proportions and wrong for marks out of a hundred — if your values are scores, remove the percent signs before sorting.
Because they are sorting as text. Text comparison works character by character, so "1" beats "9" at the first character and the comparison stops there. This tool never compares numbers as text.
They are excluded from the sorted output and counted, and that count is shown under the result. Nothing is silently dropped, so you can go back and find what was rejected.
From the ordered list. With an odd count it is the middle value; with an even count it is the mean of the two middle values. With seven values the median is the fourth.
That tool reorders whole lines of text and offers alphabetical and length modes. This one splits loose numbers on any separator, understands fraction and percentage notation, deduplicates by value, and reports the count, range and median.
No. The parsing and sorting run in your own browser with plain JavaScript. Nothing is sent to a server and nothing is stored.
This tool orders and summarises the numbers you enter. It does not validate your data or interpret what the values mean, and results that matter should be checked against the source you copied them from.