What this calculator does
A ratio compares two quantities, written as a:b. The same ratio can be written many ways (for example 18:24, 9:12, and 3:4 are all equal), but the clearest form is the one in lowest terms, where the two numbers share no common factor other than 1. This calculator takes any two numbers and reduces the ratio to its simplest equivalent form.
How to use it
Enter the first term (a) and the second term (b), then read the simplified ratio. The tool also shows the greatest common divisor (GCD) it used to reduce the ratio, so you can see exactly how the simplification was done. Decimal entries are rounded to whole numbers before reducing.
The formula explained
To simplify a:b, find the greatest common divisor of a and b, then divide both terms by it:
$$\text{Ratio} = \frac{\text{a}}{\gcd} : \frac{\text{b}}{\gcd} \qquad \gcd = \gcd\!\left(\text{a},\, \text{b}\right)$$
The GCD is computed with the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder reaches zero. The last non-zero value is the GCD.
Worked example
Simplify 18:24. The factors of 18 are 1, 2, 3, 6, 9, 18 and of 24 are 1, 2, 3, 4, 6, 8, 12, 24. The greatest shared factor is 6. Dividing both terms by 6 gives $$18\div6 : 24\div6 = \textbf{3:4}.$$ That is the ratio in lowest terms.
FAQ
What if the two numbers share no common factor? Then the GCD is 1 and the ratio is already in lowest terms — the result equals the input.
Can I enter decimals? Values are rounded to the nearest whole number first, since ratios in lowest terms are expressed with integers.
What happens with a zero? A ratio like 0:5 simplifies to 0:1, and 0:0 is undefined, returned as 0:0.