# How do I order least to greatest?

Puts whole numbers, decimals, negative numbers, fractions and mixed numbers in order from least to greatest, or greatest to least, by their exact values.

- Page: https://www.acalculator.org/math/least-to-greatest-calculator
- JSON spec: https://www.acalculator.org/math/least-to-greatest-calculator.json
- Version: 373c4693e935

## Default answer

Example with the default inputs (Numbers 3/4, -2, 0.7, 1 1/2, 2/3, 0, Order Least to greatest): From −2 to 1 1/2: −2, 0, 2/3, 0.7, 3/4, 1 1/2.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| n | Numbers | The numbers to order, separated by commas, semicolons or new lines: 3/4, -2, 0.7, 1 1/2. |
| o | Order | Least to greatest (ascending) or greatest to least (descending). |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| sorted | In order | The numbers as typed, in the chosen order, separated by commas. |
| chain | With signs | The ordered numbers joined by <, > or = signs. |
| least | Least | The smallest number. |
| greatest | Greatest | The largest number. |
| count | Count | How many numbers were typed. |

## Method

Each number is read as an exact fraction (a decimal over a power of ten, a mixed number w a/b as (w × b + a)/b) and the list is sorted by value; equal values keep the order typed.

## Assumptions

- Commas, semicolons and new lines separate numbers; spaces separate them too, except inside a mixed number such as 1 1/2.
- A comma between digits with exactly three digits after it (1,234) could be a thousands separator or a separator between numbers, so the page asks you to type 1234 or 1, 234 instead of guessing.
- Numbers are compared exactly, so 0.1 + 0.2 style rounding never changes the order.

## Worked examples

1. n = 3/4, -2, 0.7, 1 1/2, 2/3, 0, o = up gives sorted = −2, 0, 2/3, 0.7, 3/4, 1 1/2, chain = −2 < 0 < 2/3 < 0.7 < 3/4 < 1 1/2, least = −2, greatest = 1 1/2, count = 6. Source: OpenStax, Prealgebra 2e, §5.1 Decimals (order decimals: compare them place by place, or on the number line), https://openstax.org/books/prealgebra-2e/pages/5-1-decimals (retrieved 2026-10-05); OpenStax, Prealgebra 2e, §3.1 Introduction to Integers (order positive and negative numbers on the number line), https://openstax.org/books/prealgebra-2e/pages/3-1-introduction-to-integers (retrieved 2026-10-05).
2. n = 0.5, 0.45, 0.405, 0.54, o = up gives sorted = 0.405, 0.45, 0.5, 0.54. Source: OpenStax, Prealgebra 2e, §5.1 Decimals (order decimals: compare them place by place, or on the number line), https://openstax.org/books/prealgebra-2e/pages/5-1-decimals (retrieved 2026-10-05).
3. n = 1/2; 0.5; 2/4; 1234; -3.25, o = down gives sorted = 1234, 1/2, 0.5, 2/4, −3.25, chain = 1234 > 1/2 = 0.5 = 2/4 > −3.25, count = 5. Source: OpenStax, Prealgebra 2e, §5.1 Decimals (order decimals: compare them place by place, or on the number line), https://openstax.org/books/prealgebra-2e/pages/5-1-decimals (retrieved 2026-10-05); OpenStax, Prealgebra 2e, §3.1 Introduction to Integers (order positive and negative numbers on the number line), https://openstax.org/books/prealgebra-2e/pages/3-1-introduction-to-integers (retrieved 2026-10-05).
4. n = -7 -3 -10 4, o = up gives sorted = −10, −7, −3, 4, least = −10, greatest = 4. Source: OpenStax, Prealgebra 2e, §3.1 Introduction to Integers (order positive and negative numbers on the number line), https://openstax.org/books/prealgebra-2e/pages/3-1-introduction-to-integers (retrieved 2026-10-05).

## FAQ

### How do you order numbers from least to greatest?

Picture them on a number line: numbers further left are smaller. Negative numbers come first (the larger the negative, the smaller it is), then 0, then the positive numbers.

### How do I order decimals?

Line up the decimal points and compare place by place: tenths first, then hundredths. 0.405 < 0.45 < 0.5 < 0.54, because 0.405 has 4 tenths and 0 hundredths.

### How do I order fractions?

Write each as a decimal (divide the top by the bottom) or give them a common denominator, then compare. 2/3 = 0.666… and 3/4 = 0.75, so 2/3 < 3/4.

### Which is smaller, −10 or −3?

−10 is smaller: it is further left on the number line. So −10 < −7 < −3 < 4.

### What happens with equal values like 1/2 and 0.5?

They are equal, so the page joins them with = and keeps them in the order you typed them.

### Why does the page ask about commas in 1,234?

In a list, a comma separates numbers, so 1,234 could mean one thousand two hundred thirty-four, or 1 and 234. Type 1234, or 1, 234 with a space.

## Sources

- OpenStax, Prealgebra 2e, §5.1 Decimals: order decimals by comparing place values, or on a number line. CC BY 4.0. Retrieved 2026-10-05. https://openstax.org/books/prealgebra-2e/pages/5-1-decimals
- OpenStax, Prealgebra 2e, §3.1 Introduction to Integers: order positive and negative numbers on the number line (a number to the left is less). CC BY 4.0. Retrieved 2026-10-05. https://openstax.org/books/prealgebra-2e/pages/3-1-introduction-to-integers
