Math

Greater than or less than calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a greater than or less than calculator?

The greater than or less than calculator is a tool that compares two numbers and instantly tells you their relationship. Given two values, it returns the correct comparison symbol — greater than (>>), less than (<<), or equal to (==) — together with a plain-language sentence describing the result. It works with whole numbers, decimals, and negatives, so you can quickly settle which of two quantities is the larger one without any mental arithmetic.

Comparison symbols and what they mean

Comparing numbers is one of the first ideas taught in arithmetic, and it relies on three symbols:

  • Greater than >>: The value on the left is larger than the value on the right, as in 5>35 > 3.
  • Less than <<: The value on the left is smaller than the value on the right, as in 2<92 < 9.
  • Equal to ==: Both values are the same, as in 7=77 = 7.

A helpful trick for the inequality signs is that the wide, open end of the symbol always points toward the larger number, while the narrow point aims at the smaller one.

How does the calculator work?

Enter your first number (A) and your second number (B). The calculator subtracts one from the other internally to decide their order and then picks the matching symbol:

  • if AB>0A - B > 0, then A>BA > B;
  • if AB<0A - B < 0, then A<BA < B;
  • if AB=0A - B = 0, then A=BA = B.

The result is shown as a short expression such as A>BA > B along with a full sentence, for example “5 is greater than 3.”

Formula

The comparison can be written compactly as:

A>B,A<B,orA=BA > B, \quad A < B, \quad \text{or} \quad A = B

where AA is the first number and BB is the second number.

Examples of use

  1. Greater than: With A=5A = 5 and B=3B = 3, the calculator returns 5>35 > 3, since 5 is greater than 3.

  2. Less than: With A=2A = 2 and B=9B = 9, the result is 2<92 < 9, since 2 is less than 9.

  3. Equal: With A=7A = 7 and B=7B = 7, the result is 7=77 = 7, since both numbers are the same.

  4. Negative numbers: With A=5A = -5 and B=2B = -2, the result is 5<2-5 < -2, because on the number line 5-5 lies to the left of 2-2.

Practical notes

  • Negative numbers: A larger negative magnitude means a smaller value, so 5-5 is less than 2-2.
  • Decimals: Compare digit by digit after the decimal point; for example 1.5>1.251.5 > 1.25.
  • Order matters: Swapping the inputs flips the inequality, so A>BA > B becomes B<AB < A.

If instead of comparing you need to combine numbers, try the addition calculator, and to find the gap between two values use the subtraction calculator.

Frequently asked questions

Which way does the greater than sign point?

The greater than sign >> opens toward the larger number and points to the smaller one. So 8>38 > 3 reads “8 is greater than 3.”

How do I compare two negative numbers?

The number closer to zero is the larger one. For example, 1>4-1 > -4 because 1-1 sits to the right of 4-4 on the number line.

What does it mean when two numbers are equal?

Equal numbers have the same value, written with an equals sign, such as 6=66 = 6. Neither is greater nor less than the other.

Can the calculator compare decimals?

Yes. It handles decimal values directly, so a comparison like 0.75<0.80.75 < 0.8 is evaluated correctly.

Report a bug

This field is required.