Formula and calculation method
A ratio compares two quantities. For input parts a andb, the calculator finds their greatest common divisor and divides both parts by it. For example, 18:24 becomes 3:4 because both parts divide evenly by 6.
The reduced ratio is exact. The decimal relationship is a convenience display calculated as a ÷ bafter reduction and rounded to ten decimal places.
Conventions and boundaries
- Inputs: two signed whole-number ratio parts, each between −1,000,000 and 1,000,000.
- Signs: a negative second part is normalized into the first part so the displayed second part is positive.
- Zero: 0:x becomes 0:1 when x is nonzero. 0:0 and any zero second part are rejected.
- Precision: the ratio is exact integer arithmetic; the decimal is rounded only at the display boundary.
Limitations
This tool accepts integer parts only. It does not parse decimal, unit-bearing, algebraic, or expression inputs, and it does not decide whether two quantities are meaningfully comparable. Use the Percentage Calculator for percentage relationships or the Fraction Calculator for exact fraction operations.
Worked examples
- 18:24 reduces to 3:4.
- 6:−9 normalizes and reduces to −2:3.
- 0:7 reduces to 0:1.
Version and verification
Calculation version 1.0.0; formulas and deterministic fixtures last verified 2026-08-19. Automated tests cover reduction, signs, zero behavior, bounds, equivalence, and invalid inputs.