Greater Than Less Than Calculator — Compare Two Numbers
Enter two numbers and instantly see the comparison symbol (>, < or =), the arithmetic difference, the ratio and the percentage change from B to A. The number line shows exactly where A and B sit relative to each other.
- 1
Difference A − B
15 − 8 = 7 - 2
Absolute difference
|7| = 7 - 3
% change from B to A
(15 − 8) ÷ |8| × 100 = 87.50Positive when A > B, negative when A < B.
How does this calculator work?
A > B, A < B or A = B is determined by sign of A − B. This calculator also shows the absolute difference |A − B|, the ratio A/B, and the percentage change (A − B)/|B| × 100, plus a number line placing both values visually.
Formula
How this is calculated
Comparing two numbers is one of the most fundamental operations in mathematics. The comparison symbol (>, < or =) tells you the order relationship. Greater-than (A > B) means A is further to the right on the number line; less-than (A < B) means A is to the left.
The difference A − B gives the signed gap: positive if A is larger, negative if B is larger. The absolute difference |A − B| is always non-negative and represents the raw distance between the two values regardless of which is bigger. The ratio A/B answers "how many times larger is A than B?" — a ratio of 2 means A is double B; a ratio of 0.5 means A is half of B. Division by zero (B = 0) is undefined.
Percentage change from B to A is computed as (A − B)/|B| × 100. This is the standard way to express "by how many percent did the value change from B to A". Note that the denominator is |B| (absolute value of B), so the result is positive when A > B and negative when A < B.
Frequently asked questions
The greater-than sign (>) means the value on the left is larger than the value on the right. For example 7 > 3 reads 'seven is greater than three'. The less-than sign (<) is simply the reverse. A helpful memory trick: the wide opening of the symbol always faces the larger number.
The signed difference A − B preserves direction: it is positive if A > B and negative if A < B. The absolute difference |A − B| discards the sign and always gives the magnitude of the gap. For example, if A = 3 and B = 7: signed difference = −4, absolute difference = 4.
Percentage change is undefined when B = 0, because you would be dividing by zero. In that case the calculator shows "undefined". If B is very close to zero the result can be extremely large — interpret such percentages with caution.
Also known as
TG we-Calculate Editorial Team. (2026). Greater Than Less Than Calculator — Compare Two Numbers [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/greater-less-calculator
TG we-Calculate Editorial Team. "Greater Than Less Than Calculator — Compare Two Numbers." TG we-Calculate. 2026. https://we-calculate.com/calculator/greater-less-calculator.
TG we-Calculate Editorial Team, "Greater Than Less Than Calculator — Compare Two Numbers," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/greater-less-calculator
@misc{wecalculate_greater_less_calculator, title = {Greater Than Less Than Calculator — Compare Two Numbers}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/greater-less-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
