# Is it greater than less than or equal?

Compares two numbers, decimals, negatives or fractions exactly and writes the right sign: greater than (>), less than (<) or equal (=), with the difference.

- Page: https://www.acalculator.org/math/greater-than-less-than-calculator
- JSON spec: https://www.acalculator.org/math/greater-than-less-than-calculator.json
- Version: 8ae91d7be19b

## Default answer

Example with the default inputs (First number 3/4, Second number 0.7): 3/4 is greater than 0.7.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| a | First number | The first number: a whole number, a decimal, or a fraction such as 3/4 or 1 1/2. |
| b | Second number | The second number: a whole number, a decimal, or a fraction such as 3/4 or 1 1/2. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| result | Comparison | The two numbers with the sign between them. |
| sign | Sign | >, < or =. |
| words | In words | The comparison in words. |
| difference | Difference (first − second) | The first number minus the second, as an exact fraction in lowest terms. |
| decimal | Difference (decimal) | The same difference as a decimal, to 12 significant figures. |

## Method

Read both numbers as exact fractions and compare: a > b when a − b is positive, a < b when it is negative, and a = b when it is 0.

## Assumptions

- A decimal is read exactly as typed; a mixed number w a/b is w + a/b (with the sign on the whole).
- A comma between digits is a thousands separator in groups of three (1,234); any other comma gives no answer.

## Worked examples

1. a = 3/4, b = 0.7 gives result = 3/4 > 0.7, sign = >, words = 3/4 is greater than 0.7, difference = 1/20, decimal = 0.05. Source: OpenStax, Prealgebra 2e, §5.1 Decimals (order decimals by place value), https://openstax.org/books/prealgebra-2e/pages/5-1-decimals (retrieved 2026-10-05).
2. a = -5, b = -2 gives result = −5 < −2, sign = <, difference = −3. Source: OpenStax, Prealgebra 2e, §3.1 Introduction to Integers (a < b when a is to the left of b on the number line), https://openstax.org/books/prealgebra-2e/pages/3-1-introduction-to-integers (retrieved 2026-10-05).
3. a = 2/4, b = 0.5 gives result = 2/4 = 0.5, sign = =, words = 2/4 is equal to 0.5, difference = 0, decimal = 0. Source: OpenStax, Prealgebra 2e, §5.1 Decimals (order decimals by place value), https://openstax.org/books/prealgebra-2e/pages/5-1-decimals (retrieved 2026-10-05).
4. a = 0.45, b = 0.405 gives sign = >, difference = 9/200. Source: OpenStax, Prealgebra 2e, §5.1 Decimals (order decimals by place value), https://openstax.org/books/prealgebra-2e/pages/5-1-decimals (retrieved 2026-10-05).
5. a = 1 1/3, b = 1,234 gives sign = <, difference = −1232 2/3. Source: OpenStax, Prealgebra 2e, §3.1 Introduction to Integers (a < b when a is to the left of b on the number line), https://openstax.org/books/prealgebra-2e/pages/3-1-introduction-to-integers (retrieved 2026-10-05).

## FAQ

### What do the greater than and less than signs mean?

> means "is greater than" and < means "is less than". The wide, open side faces the larger number: 5 > 3 and 3 < 5.

### How do I compare negative numbers?

The number further left on the number line is smaller. −5 < −2, even though 5 is more than 2.

### How do I compare a fraction and a decimal?

Write the fraction as a decimal: 3/4 = 0.75, which is more than 0.7, so 3/4 > 0.7.

### Is 0.45 greater than 0.405?

Yes. Both have 4 tenths; in the hundredths 5 > 0, so 0.45 > 0.405. More digits do not make a decimal bigger.

### When are two numbers equal?

When their difference is 0, even if they are written differently: 2/4 = 1/2 = 0.5.

### Can I type commas?

Yes, as thousands separators in groups of three: 1,234 is one number. A comma anywhere else, as in 1,5, gives a message.

## Sources

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