Sort numbers from least to greatest with number line visualization, ranked data table with percentiles, gap analysis, outlier detection, and five-number summary.
Sorting numbers from least to greatest (ascending order) is one of the most fundamental operations in mathematics and data analysis. This calculator sorts any set of numbers and enriches the result with statistical context: a number line visualization, ranked table with percentiles and gap analysis, outlier detection using the IQR method, and a complete five-number summary.
Enter whole numbers, decimals, or negative numbers separated by commas or spaces. The sorted output uses the "<" symbol between values for clear presentation, with the minimum highlighted in red and the maximum in green. Each value is annotated with its rank, percentile position, gap from the previous value, and deviation from the mean.
The outlier detection feature flags values beyond the 1.5×IQR fences — a critical step in data cleaning that many simple sorting tools miss entirely. Whether you're ordering measurements for a lab report, sorting financial data, helping with homework, or preparing data for analysis, this calculator provides the complete picture.
This calculator does more than sort — it transforms a list of numbers into a statistical profile. The number line visualization immediately shows clustering, gaps, and spread. The ranked table with deviation and outlier columns provides the kind of annotated output that data analysts create manually. The five-number summary and fences complete the picture.
Support for currency and percentage formatting, adjustable decimal places, and large datasets makes this practical for real-world use in classrooms, labs, and offices.
Ascending sort: arrange values so v₁ ≤ v₂ ≤ ... ≤ vₙ Percentile of rank r: (r − 1) / (n − 1) × 100% Gap: vᵣ − vᵣ₋₁ IQR: Q3 − Q1 Lower Fence: Q1 − 1.5 × IQR Upper Fence: Q3 + 1.5 × IQR Outlier: value < Lower Fence OR value > Upper Fence
Result: 4 < 6 < 11 < 14 < 17 < 23 < 27 < 31 < 38 < 42 < 50 < 56 < 58 < 65 < 71 < 76 < 83 < 89 < 94 < 100
Twenty values sorted from 4 to 100. Range = 96, Mean = 47.75, Median = 46.0. Q1 = 17, Q3 = 76, IQR = 59. Fences are −71.5 and 164.5, so no outliers in this dataset. The largest gap (11) occurs between 76 and 83.
Under the hood, sorting is performed by JavaScript's Array.sort(), which typically uses TimSort (a hybrid merge/insertion sort). TimSort has O(n log n) worst-case complexity and is particularly efficient on partially sorted data. For small datasets like those entered manually, any algorithm works instantly; for large datasets, efficient algorithms matter enormously.
"Put these numbers in order from least to greatest" is one of the most common math worksheet prompts from grades 1 through 6. It develops number sense — the intuitive understanding of magnitude, position, and relationships between numbers. Students progress from single-digit whole numbers to multi-digit numbers, negatives, fractions, and decimals.
Sorted data enables order statistics: the k-th smallest value in a dataset. The minimum (1st order statistic) and maximum (n-th order statistic) define the range. Percentiles and quartiles are interpolated from order statistics. The median — the middle order statistic — is the most robust measure of central tendency, immune to outliers that can dramatically affect the mean.
Ascending order means arranging values from the smallest to the largest. Each value is less than or equal to the next. The terms "ascending order," "increasing order," and "least to greatest" all mean the same thing.
Values outside the "fences" Q1 − 1.5×IQR and Q3 + 1.5×IQR are flagged as potential outliers. This is the same method used in box-and-whisker plots. The IQR method is robust because outliers don't affect Q1, Q3, or IQR much.
The percentile shows the percentage of values that are at or below a given rank. The minimum is at the 0th percentile, the maximum at the 100th. A percentile of 75 means the value is greater than or equal to 75% of the data.
Yes. Negative numbers are sorted correctly: −8 < −5 < −3 < −1 < 0 < 2 < 4 < 5 < 7 < 9. The number line visualization adjusts automatically.
Equal values appear next to each other in the sorted output. They receive consecutive rank numbers and have a gap of 0 between them.
Sorting is the prerequisite for many statistical calculations: median, percentiles, quartiles, IQR, range, box plots, stem-and-leaf plots, and rank-based tests like Wilcoxon. It also reveals gaps, clusters, and outliers that raw data doesn't show.