Summary
Simplify an integer ratio and calculate its finite decimal comparison.
Calculation details
The second value cannot be zero because the decimal would be undefined. Calculations retain raw JavaScript number precision; display values are rounded to at most six decimal places.
Formula
a:b is reduced by gcd(|a|, |b|); decimal = a / b.
Worked example
Ratio Calculator example
12:18 simplifies to 2:3.
How it works
Enter two integers. The ratio is simplified by GCD and the decimal comparison is a ÷ b (b cannot be zero).
Frequently asked questions
How accurate is the Ratio Calculator?
The calculation keeps raw numeric precision and rounds only the displayed result to at most six decimal places.
What should I do with an invalid result?
Check that every visible value is finite and that no required divisor is zero.