Free · Number comparisons
Compare Two Signed Numbers or Decimals
Compare two real numeric values and show whether the first is greater than, equal to or less than the second.
- Formula & worked example
- Private in your browser
- No signup
Calculator inputs
Loading calculator…
How to use this calculator
- Enter the known values in the units shown. Results update as you type.
- Where results are editable, change one to solve backwards. Lock a value to hold it fixed.
- Use the worked example to check the method. Reset restores the starting fields.
Private by default
Inputs and results stay in this browser tab. Bookify does not upload or store the values you enter.
Formula and method
−2 is greater than −5 because it lies farther right on the number line. Entering equal values reports equality.
Compare the first numeric value with the second using greater than, equal to or less than
Worked example
Enter these known values and leave the other values blank.
- First number a
- -2
- Second number b
- -5
- Result
- -2 is greater than -5.
- Explanation
- First value: -2.
- Explanation
- Relation: greater than.
- Explanation
- Second value: -5.
Assumptions and limitations
- This is a numeric comparison of finite real values, not alphabetical ordering or a comparison of complex numbers.
- Calculations use 64 significant digits. Values that differ beyond that working precision cannot be distinguished reliably. Comparison sentences show the stored values without the shorter input-display rounding.
Common questions
Which negative number is larger?
The one closer to zero. For example, −2 is larger than −5.
Are 1.20 and 1.2 equal?
Yes. Extra trailing decimal zeros do not change the numeric value.
References
Compare the sign of the difference so distinct stored values are not treated as equal by approximate-equality tolerances.