Order Least to Greatest Calculator

Order Least to Greatest Calculator

Growing AI Skill PRO

Enter Calculation

Formula

Sorted=sort↑(Numbers),a1≤a2≤⋯≤an\text{Sorted} = \operatorname{sort}_{\uparrow}\left(\text{Numbers}\right),\quad a_1 \le a_2 \le \cdots \le a_n
Usage stats

Advertisement

Results

Ordered List
1, 2, 5, 8, 9
5 numbers
Count of numbers 5
Minimum value 1
Maximum value 9

Report an error on this page

What is the Order Least to Greatest Calculator?

This tool takes any list of numbers and arranges them in order — either from least to greatest (ascending) or greatest to least (descending). It works with whole numbers, decimals, and negative values, making it handy for homework, statistics, and quick data tidy-ups.

Number line showing scattered values rearranged into ascending order
Sorting values from least (left) to greatest (right) along a number line.

How to use it

Type your numbers into the box, separated by commas or spaces (for example 5, 2, 8, 1, 9). Choose whether you want them ordered from least to greatest or greatest to least, then submit. The calculator returns the sorted list along with the count, minimum, and maximum.

The formula explained

Sorting in ascending order means producing a sequence where every element is less than or equal to the one after it: \(a_1 \le a_2 \le \cdots \le a_n\).

$$\text{Sorted} = \operatorname{sort}_{\uparrow}\left(\text{Numbers}\right),\quad a_1 \le a_2 \le \cdots \le a_n$$

Descending order simply reverses this so \(a_1 \ge a_2 \ge \cdots \ge a_n\).

$$\text{Sorted} = \operatorname{sort}_{\downarrow}\left(\text{Numbers}\right),\quad a_1 \ge a_2 \ge \cdots \ge a_n$$

The calculator compares each value numerically (not as text), so 9 correctly comes after 10? No — numerically \(9 < 10\), so 9 is placed first.

Advertisement
Unsorted bars on the left rearranged into ascending order on the right
The same set of numbers before and after ordering least to greatest.

Worked example

Given the list \(5, 2, 8, 1, 9\) in ascending order: the smallest value is 1, then 2, 5, 8, and finally 9. The result is 1, 2, 5, 8, 9 with a count of 5, minimum 1, and maximum 9.

How to Order Numbers by Hand

Follow these steps to sort any list from least to greatest (ascending). The same method works for whole numbers, decimals and negatives.

  1. Compare signs first. Split the list into negatives, zero and positives. Every negative number is less than zero, and zero is less than every positive number. So the final order is: negatives, then zero, then positives.
  2. Order the negatives by distance from zero. For negative numbers, the one farther from zero is smaller. For example, \(-7 < -2\) because \(-7\) is 7 units below zero and \(-2\) is only 2 units below zero.
  3. Compare decimals by aligning place values. Write the numbers with the same number of decimal places by adding trailing zeros. For example, to compare 2.75 and 2.7, rewrite 2.7 as 2.70. Then 2.70 < 2.75, so \(2.7 < 2.75\). Length does not matter: 2.75 has more digits but it is not automatically larger or smaller; compare digit by digit from left to right.
  4. Repeatedly pick the smallest remaining value. Scan the list, choose the smallest number, write it down, cross it off, and repeat until none are left. Alternatively, place the numbers on a number line: values further left are smaller, so reading left to right gives ascending order.
  5. Check your result. Confirm the sorted list has the same count of numbers as the original (duplicates included), and that each value is less than or equal to the next: \(a_1 \le a_2 \le \cdots \le a_n\).

Descending order: to sort from greatest to least, sort ascending as above and then reverse the list. Equal values stay together either way.

Advertisement

Sorting Examples: Negatives, Decimals and Duplicates

Input list Ascending result Descending result Note
3, -1, -8, 0, 5 -8, -1, 0, 3, 5 5, 3, 0, -1, -8 Negatives come first; -8 is smaller than -1 because it is farther from zero.
0.5, 0.25, 0.75, 0.125 0.125, 0.25, 0.5, 0.75 0.75, 0.5, 0.25, 0.125 Align places: 0.500, 0.250, 0.750, 0.125. More digits does not mean a larger value.
4, 2, 4, 1, 2 1, 2, 2, 4, 4 4, 4, 2, 2, 1 Duplicates are kept, so the output has the same count (5) as the input.
9, 10, 100, 8 8, 9, 10, 100 100, 10, 9, 8 Numeric order, not text order. Sorted as text, the result would be 10, 100, 8, 9, which is wrong for numbers.
0.5, 0.333, 0.25, 0.75 (fractions 1/2, 1/3 approx., 1/4, 3/4 as decimals) 0.25, 0.333, 0.5, 0.75 0.75, 0.5, 0.333, 0.25 Fractions can be sorted once written as decimals; 1/3 is rounded here to 0.333.

FAQ

Can it sort decimals and negatives? Yes. Values like \(-3.5\) or \(2.75\) are compared by their true numeric value.

What separators can I use? Commas, spaces, semicolons, tabs, or new lines all work.

What happens to duplicate numbers? Duplicates are kept and placed next to each other in the sorted list.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators