# Greater Than or Less Than Calculator

URL: https://speedycalculator.com/calculators/math/greater-less/
Last updated: 2026-10-30

> The greater than or less than calculator compares two numbers – including negatives, decimals and fractions typed as decimals – and tells you which symbol (>, < or =) goes between them.

## Inputs

- First number (a)
- Second number (b)

## Results

- Comparison
- Difference a − b
- The larger number

## Formula

```
a > b if a − b > 0;  a < b if a − b < 0;  a = b otherwise
```

## Explanation

Comparing numbers sounds simple until negatives and decimals are involved: −0.5 is greater than −2, and 0.45 is less than 0.5. The calculator applies the number-line rule – the number further to the right is greater.

### How to use the Greater Than or Less Than Calculator

- **First number (a)**
- **Second number (b)**

Results update as you type, and everything is calculated in your browser.

### How it works

The difference a − b decides the result: positive means a is greater, negative means b is greater, zero means they are equal.

### Inputs explained

FieldWhat to enterFirst number (a)A numberSecond number (b)A number

### What each result means

- **Difference a − b** = [First number (a)] - [Second number (b)]
- **The larger number** = max([First number (a)], [Second number (b)])

## Worked example

Inputs — First number (a): -0.5; Second number (b): -2.

Results — **Comparison = a > b (a is greater)**; Difference a − b = 1.5; The larger number = -0.5.

## Key terms

- **Inequality symbols**: > greater than, < less than, = equal to.

## FAQ

**Which is greater, −3 or −7?**
−3, because it is further right on the number line.

**How do I remember > and <?**
The wide end opens towards the larger number.

**Is 0.5 greater than 0.45?**
Yes – compare 0.50 with 0.45.

**How do I compare fractions?**
Convert them to decimals or to a common denominator – see the comparing fractions calculator.


## Sources

- [OpenStax – Prealgebra 2e](https://openstax.org/details/books/prealgebra-2e)
- [OpenStax – Contemporary Mathematics](https://openstax.org/details/books/contemporary-mathematics)
