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
How many numbers can I sort at once?
There is no hard limit — this calculator handles lists in the thousands. For very large lists (tens of thousands of items), performance may slow slightly in some browsers. For spreadsheet-sized data, consider a dedicated tool or spreadsheet software.
How is the median calculated for an even count?
When the count is odd, the median is the middle number. When the count is even, the median is the average of the two middle numbers. For example, in [1, 3, 5, 7] (sorted), the median = (3 + 5) / 2 = 4.
Does this handle decimal and negative numbers?
Yes. Both negative numbers (e.g., −5) and decimals (e.g., 3.14) are fully supported. Enter them as you normally would — the parser handles standard decimal notation.
What is the difference between mean and median?
Mean is the arithmetic average (sum ÷ count). Median is the middle value when sorted. The median is more robust to outliers: a single extremely large value raises the mean significantly but barely moves the median. Income and housing price distributions are typically reported as medians for this reason.
Number sorter — order, deduplicate, and summarize lists
Sorting algorithms in brief
JavaScript's built-in Array.sort() uses an efficient comparison-based algorithm (typically TimSort or similar), with O(n log n) average time complexity. For practical purposes this means even a list of 100,000 numbers sorts in milliseconds in the browser. This calculator leverages that directly, so there is no need to implement sorting manually.
Mean vs. median: which to report?
The mean is affected by every value, making it sensitive to outliers. The median splits the sorted list in half — 50% of values are below it, 50% above. Skewed distributions (income, house prices, test scores with a few very high values) are better summarized by the median. Symmetric, bell-shaped distributions have approximately equal mean and median. Always report both when the distribution shape is unknown.
Applications in data cleaning
Sorting a list is often the first step in data cleaning: it immediately reveals duplicates (they appear adjacent), outliers (extreme values appear at the ends), and data entry errors (a value of 999 in a list of 0–10 scores stands out instantly). Removing duplicates before analysis prevents over-counting and distorted statistics — particularly important in survey data and sensor readings.
Learn more from an authoritative source:
WikipediaScientific Calculator
Evaluate mathematical expressions including trigonometry, logarithms, exponents, and more.
Percentage Calculator
Quickly calculate percentages, percentage change, and percentage of a total.
Fraction Calculator
Add, subtract, multiply, or divide two fractions and get the simplified result instantly.
Ratio Calculator
Simplify ratios, find missing values, and scale ratios up or down.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →