A ratio compares two quantities, and the same comparison can be written many ways — 24:36, 8:12, and 2:3 all describe the same proportion. This tool reduces any ratio to its simplest whole-number form so it is easy to read, compare, and communicate.
How it works
Simplifying a ratio means dividing both terms by their greatest common divisor
(GCD). The tool finds the GCD with the Euclidean algorithm, which repeatedly
replaces the pair (a, b) with (b, a mod b) until the remainder is zero:
24 : 36
gcd(24, 36) = 12
24 / 12 = 2
36 / 12 = 3
simplified -> 2 : 3
When you enter decimals, the tool first scales both terms up to whole numbers by
clearing the decimal points, then reduces. So 1.5 : 4.5 is scaled to 15 : 45
and reduced to 1 : 3. All arithmetic uses exact integer math, so there is no
rounding error.
Tips and example
This is handy for screen and image aspect ratios: enter 1920 and 1080 and it
reduces to 16 : 9. A ratio with a zero term such as 0 : 5 simplifies to
0 : 1, while 0 : 0 is reported as undefined. The tool also shows the ratio as
a single decimal value (2:3 becomes about 0.667) so you can compare proportions
that do not reduce to tidy numbers.