Enter ratio calculator values

Enter first value.
Enter second value.
Simplified first
2
Simplified second
3
Decimal
0.666667

The simplified ratio is 2:3.

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.

Related calculators