Skip to content
FiftyCalc Free calculators for all 50 states

Greater Than or Less Than Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Enter two numbers to see which sign goes between them, greater than (>), less than (<) or equal (=), and how far apart they are.

Result

Sample figures

Comparison—

Difference a − b —

  • Distance |a − b|—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Greater Than or Less Than Calculator

First number a: enter a number. Prefilled example: 0.25.

Second number b: enter a number. Prefilled example: 0.3.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. First number a: enter a number.
  2. Second number b: enter a number.
  3. Read the result: Comparison; the panel also shows Difference a − b and Distance |a − b|.

How this calculator works

On the number line, a is less than b (a < b) when a lies to the left of b, and greater (a > b) when it lies to the right. The open side of the sign faces the larger number.

For decimals, compare place by place from the left; for negative numbers, the one farther from zero is the smaller one (−5 < −2).

The formula

  1. Cmp={1if a<b2if a>b3otherwise
Symbols used in the formula
SymbolMeaning
aFirst number a
bSecond number b
CmpComparison

Worked example

First number a0.25
Second number b0.3
Difference a − b-0.05
Distance |a − b|0.05
  1. Cmp=1

Comparison a < b (a is less than b)

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

Is 0.25 greater than 0.3?

No. 0.25 < 0.3, because 0.25 has 2 tenths and 0.3 has 3 tenths; the difference is 0.05.

Which is bigger, −5 or −2?

−2. On the number line −5 is farther left, so −5 < −2.

Related calculators