Quick answer
Comparing a and b gives a > b, a < b or a = b. For 5 and 3 the answer is 5 > 3.
Enter two numbers. The calculator returns the comparison. Use this greater than less than calculator to check your own figures.
Related tools: Fraction Calculator: Add, subtract, multiply and divide fractions with simplified and mixed-number results. Ratio Calculator: Simplify a ratio of two whole numbers. Average Calculator: Arithmetic mean, sum, count, minimum and maximum of a list of numbers.
How to use the Greater Than Less Than Calculator
- Enter first number.
- Enter second number.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| First number | A number | — |
| Second number | A number | — |
Formula and method
Formula
a > b, a < b or a = b
IEEE-754 double precision; shown to at most 6 decimal places.
Numeric comparison.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: First number = 5; Second number = 3.
| Result | Value |
|---|---|
| Comparison | 5 > 3 |
Example 2
Inputs: First number = -1; Second number = 2.
| Result | Value |
|---|---|
| Comparison | -1 < 2 |
Example 3
Inputs: First number = 2.0; Second number = 2.
| Result | Value |
|---|---|
| Comparison | 2 = 2 |
The first line is the headline result (comparison). IEEE-754 double precision; shown to at most 6 decimal places.
Symbols
> means greater than, < means less than and = means equal. The open end of the symbol points at the larger number. Negative numbers: −2 > −5.
Tips
On a number line, the number further right is greater. Compare decimals digit by digit: 0.45 < 0.5. Fractions can be compared with cross-multiplication or the Compare Fractions calculator.
How the result changes with first number
Holding every other input at the first worked example, this table changes only first number. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| First number | Comparison |
|---|---|
| 2.5 | 2.5 < 3 |
| 5 | 5 > 3 |
| 10 | 10 > 3 |
| 20 | 20 > 3 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- First number: entering "x" shows "First number must be a number." beside that field and no result.
Choosing between the Greater Than Less Than Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Fraction Calculator](/math/fraction-calculator/) | numerator 1, denominator 1 and operation | Result |
| [Ratio Calculator](/math/ratio-calculator/) | first number and second number | Simplified ratio |
| [Average Calculator](/math/average-calculator/) | numbers | Average (mean) |
| [Long Division Calculator](/math/long-division-calculator/) | dividend and divisor | Quotient |
| [Percent Off Calculator](/math/percent-off-calculator/) | original price and discount | Sale price |
Background: rounding and basic arithmetic
Rounding to a place looks at the digit just to its right: 0 to 4 rounds down and 5 to 9 rounds up (the half-up convention, so 2.5 becomes 3). Rounding 838.274 gives 800 to the nearest hundred, 840 to the nearest ten and 838 to the nearest one.
Some systems use banker's rounding (half to even), which sends 2.5 to 2 and 3.5 to 4; check which convention your task requires, and round only at the end of a multi-step calculation.
Assumptions and limitations
- Any real numbers
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for first number to confirm this.
Frequently asked questions
Is −3 greater than −7?
Yes. −3 lies to the right of −7 on the number line, so −3 > −7.
What does ≥ mean?
Greater than or equal to.
How do I compare 0.3 and 0.25?
0.3 is greater than 0.25, because 0.30 > 0.25 when both have two decimals.
What does the Greater Than Less Than Calculator calculate?
Compare two numbers. It returns Comparison.
What formula does the Greater Than Less Than Calculator use?
a > b, a < b or a = b. Numeric comparison.
What do I need to enter in the greater Than Less Than Calculator?
You enter First number and Second number.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Any real numbers.
What is an example of a greater Than Less Than result?
With first number 5 and second number 3, the comparison is 5 > 3.
Related calculators
- Fraction Calculator — Add, subtract, multiply and divide fractions with simplified and mixed-number results.
- Ratio Calculator — Simplify a ratio of two whole numbers.
- Average Calculator — Arithmetic mean, sum, count, minimum and maximum of a list of numbers.
- Long Division Calculator — Divide whole numbers to a chosen number of decimal places.
- Percent Off Calculator — Find the sale price and savings after a percentage discount.
- Rounding Calculator — Round a number to decimal places, with up, down or nearest modes.
- Round to the Nearest Cent — Round a number to the nearest cent (0.01).
- Round to the Nearest Thousand — Round a number to the nearest thousand.
- Round to the Nearest Integer — Round a number to the nearest integer.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.