Number Sorter

Paste a list of numbers (any separator) and sort them ascending or descending, with optional duplicate removal — copy or download the result.

1,331 views

How Sorting and Statistics Work

Paste any list of numbers — separated by commas, spaces, tabs, semicolons, or line breaks in any combination — and the tool parses each value, sorts the full set in ascending or descending order, and can optionally strip exact duplicates to leave only unique values. Because sorting is done by actual numeric value rather than as text, negative numbers, decimals, and numbers written with different digit counts all line up correctly (for example, -5 sorts before 3, and 9 sorts before 10).

Alongside the sorted list, the tool computes three central-tendency statistics that answer different questions about the same data:

  • Mean (average): the sum of every value divided by how many values there are. Every number in the set affects the result, which makes the mean sensitive to extreme values.
  • Median: the value sitting exactly in the middle of the sorted list. With an odd count of numbers, it is the single middle value; with an even count, it is the average of the two middle values.
  • Mode: the value that occurs most often in the list. There can be one mode, several (multimodal), or none at all if every value is unique.

Example: for the list 4, 8, 15, 16, 23, 42, 42 (seven values, all unique except one repeat), sorting returns the same order. The mean is 150 ÷ 7 ≈ 21.43. The median is the 4th value in the sorted list, which is 16. The mode is 42, since it is the only value that repeats.

What You Should Know

Mean and median can diverge sharply when a data set is skewed by outliers. Take five household incomes: 29,000, 30,000, 31,000, 32,000 and 500,000. The mean is pulled far upward to 124,400 by the single outlier, while the median stays at 31,000 — a number four of the five households are actually close to. This is exactly why economists report median household income rather than average income: the median better represents a "typical" value when a few extreme numbers would otherwise distort the picture. Mode, meanwhile, is most useful for categorical or repeating data, like exam scores or shoe sizes, rather than continuous measurements where every value tends to be unique.

Frequently Asked Questions

What separators are supported?

Commas, spaces, tabs, semicolons and line breaks — mixed freely in the same input. Decimal points and negative signs are preserved.

Does it handle decimals and negative numbers?

Yes — any valid number format, including decimals and negatives, sorts correctly by numeric value, not alphabetically.

What is the difference between mean and median, and which should I use?

The mean weights every value equally and is simplest to compute, but a handful of extreme values can pull it away from where most of the data actually sits. The median ignores magnitude entirely and only cares about position, so it stays anchored near the middle of the data even when outliers are present. Use the mean for evenly distributed data, such as test scores clustered around a center, and the median for skewed data, such as prices, incomes or response times, where outliers are common.

Can a list have more than one mode, or no mode at all?

Yes. If two or more values tie for the highest frequency, the list is multimodal and all of them count as modes. If every value in the list appears exactly once, there is no mode at all, since no value repeats more than any other.

Does removing duplicates change the statistics?

Yes. Removing duplicates changes both the count of values and the underlying set they are drawn from, so the mean, median and mode are recalculated on the deduplicated list. This is useful when duplicate entries represent the same measurement logged twice rather than genuinely repeated observations.

Comments

No comments yet — be the first to write one!

Similar Tools