Skip to content
Math

Greater Than or Less Than Calculator

Enter two numbers to find out which is greater, which is less, or whether they are equal. The calculator shows the comparison symbol (>, <, or =), the absolute difference between the values, their ratio, and a plain-English step-by-step explanation of how the comparison works. It handles integers, decimals, negative numbers, and fractions.

Your details

Choose how you are entering the two values.
The first number to compare. Negative values are supported.
The second number to compare.
Controls how many decimal places appear in the difference and ratio outputs.
ComparisonA is greater
A > B (7 > 5)

The mathematical relationship: >, <, or =

Larger value7
Smaller value5
Absolute difference (A - B)2
Ratio (A / B)1.4
% difference33.3333%

Result: A > B

  • A is larger than B by 2.
  • A is 1.4 times the size of B.
  • The symbols > (greater than) and < (less than) always point toward the smaller number.

Next stepTo compare multi-digit decimals by hand: align decimal points, then compare digit by digit from left to right.

Formula

A>B    AB>0,A<B    AB<0,A=B    AB=0A > B \iff A - B > 0, \quad A < B \iff A - B < 0, \quad A = B \iff A - B = 0

Worked example

Compare 7 and 5. Both are positive. Integer parts: 7 vs 5. Since 7 > 5, the result is 7 > 5. Difference: 7 - 5 = 2. Ratio: 7 / 5 = 1.4.

How to compare two numbers

Comparing two numbers means deciding whether the first is larger, smaller, or equal to the second. For positive integers, the process is straightforward: you look at the number with more digits first (a three-digit number is always larger than a two-digit number), then compare digit by digit from left to right when the digit counts are the same. For decimal numbers, you align the decimal points and compare each column of digits in turn, from left to right, stopping as soon as one column differs. For negative numbers the direction reverses: -3 is greater than -7 because -3 is closer to zero. A negative number is always less than a positive number.

Greater than, less than, and equal to symbols

Three symbols capture every possible relationship between two numbers. The greater-than symbol (>) points left with the open end toward the larger value: 9 > 4. The less-than symbol (<) points right with the open end toward the larger value: 4 < 9. The equal sign (=) means both values are identical. A popular memory aid is the "alligator method": imagine the symbol as an alligator's mouth, which always opens toward the bigger meal. Another aid is the "L method": the less-than symbol < looks like the capital letter L, helping you remember that < means Less. Two extended symbols are also common: >= means "greater than or equal to" and <= means "less than or equal to", used when a value can be at the boundary as well as above or below it.

Comparing fractions and decimals

To compare two fractions by hand, convert them to a common denominator and then compare the numerators. For example, 3/4 versus 2/3: convert to twelfths to get 9/12 and 8/12, so 3/4 > 2/3. Decimal comparison works the same way as integer comparison once you align decimal points. A common mistake is to treat the number of decimal digits as a proxy for size: 0.9 is greater than 0.75 even though 0.75 has more digits. Always compare position by position from the decimal point outward. This calculator accepts fractions entered as their decimal equivalents and percentages entered as plain numbers (for example, type 75 to compare 75%).

The difference and ratio between two numbers

Beyond the symbol, it is often useful to know how far apart two values are and how many times larger one is than the other. The absolute difference (|A - B|) gives the gap in the same units as the inputs. The ratio (A / B) tells you how many times larger A is relative to B: a ratio of 2 means A is twice B, a ratio of 0.5 means A is half of B. The percentage difference expresses the gap as a fraction of the average of both values, which is useful when comparing quantities of similar magnitude. This calculator computes all three automatically alongside the comparison symbol.

Comparison symbols and their meanings

SymbolMeaningExampleRead as
>Greater than7 > 5Seven is greater than five
<Less than3 < 8Three is less than eight
=Equal to6 = 6Six equals six
>=Greater than or equal to5 >= 5Five is greater than or equal to five
<=Less than or equal to4 <= 7Four is less than or equal to seven
-Negative precedes symbol-3 > -7Negative three is greater than negative seven

Quick reference for the three comparison symbols used in mathematics.

Frequently asked questions

Which symbol means greater than?

The greater-than symbol is >. The open end (the wide side) faces the larger value and the pointed end faces the smaller value. For example, 9 > 3 reads "nine is greater than three".

Which symbol means less than?

The less-than symbol is <. As with the greater-than symbol, the open end faces the larger value. So 3 < 9 reads "three is less than nine". A helpful memory trick: < looks like the capital letter L, which stands for "Less than".

How do I compare negative numbers?

For negative numbers the order is reversed compared to their absolute values. A number closer to zero is greater. For example, -2 > -5 because -2 is closer to zero. Any positive number is always greater than any negative number.

How do I compare fractions without a calculator?

Find a common denominator for both fractions, convert each fraction to that denominator, then compare the numerators. The fraction with the larger numerator is the greater fraction. For example, 3/4 vs 2/3: the common denominator is 12, giving 9/12 vs 8/12, so 3/4 is greater.

What is the difference between >= and >?

>= means "greater than or equal to", so it is true when the left side is larger OR when both sides are equal. > is strictly greater than and is false when both sides are equal. For example, 5 >= 5 is true, but 5 > 5 is false.

How do I compare decimal numbers by hand?

Align the decimal points, then compare each digit column from left to right. Stop as soon as you find a column where the digits differ: the number with the larger digit in that column is the greater number. Trailing zeros do not change the value, so 0.50 and 0.5 are equal.

What is the percentage difference between two numbers?

Percentage difference is calculated as: |A - B| / ((|A| + |B|) / 2) x 100. It expresses how large the gap is relative to the average of the two numbers. Note that percentage difference is not the same as percentage change, which always compares relative to the starting (reference) value.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…