Calculators
Ratio calculator
This ratio calculator simplifies a ratio, scales an equivalent pair by a chosen factor, or solves the missing value in A : B = C : D. Enter whole numbers, signed decimals or fractions such as -3/4. It runs in your browser and gives exact whole numbers or fractions, never a rounded decimal.
Your ratio
Choose an operation and enter your values.
Loading calculator…
Your result
Select Calculate to see your exact result.
How to use the ratio calculator
Under Operation, choose Simplify a ratio, Equivalent ratio or Find a missing value. Simplify and Equivalent use First value (A) and Second value (B). Equivalent also asks Multiply both parts by, a nonzero scale factor.
Find a missing value adds Third value (C) and Fourth value (D), plus a Missing value in A : B = C : D select where you choose which of A, B, C or D to solve for. The field you solve for changes to an "Unknown" marker, so an old value in it is ignored. Type whole numbers, signed decimals or fractions such as 3.5, -2 or 4/6, using a dot for decimals with no commas or exponent notation.
Select Calculate. The answer appears above the full equation, and Download text saves both, with the simplified ratio and the note, to ratio-result.txt.
How simplifying, scaling and solving work
Simplify divides both parts by their greatest common divisor, so 12 : 18 becomes 2 : 3. The simplified ratio always has its first nonzero part positive: -2 : 3 becomes 2 : -3, and -2 : -3 becomes 2 : 3.
Equivalent multiplies both original parts by the same nonzero factor. Scaling 12 : 18 by 2 gives 24 : 36, and the page still reports the simplified ratio, 2 : 3, alongside it.
Find a missing value solves A × D = B × C for the chosen letter. With A = 12, B = 18 and C = 4, solving for D gives 6, so 12 : 18 = 4 : 6. Solving for A instead gives 12 back. Solving can also fail without a 0 : 0 pair: A = 0, B = 5, C = 3 gives no solution, and C = 0 instead gives no unique answer, since any nonzero D would then satisfy the equation.
Limits
There are no fields for a financial ratio such as debt-to-income, capital adequacy or loan-to-debt, or for a body-composition ratio. Those ratios need fields this tool does not have, since it compares only two generic parts, not a named financial or body measurement.
A ratio of 0 : 0 has no defined value and returns an error. 0 : 5 and 5 : 0 are accepted and simplify to 0 : 1 and 1 : 0, keeping the zero. Equivalent mode rejects a scale factor of 0, because multiplying by zero would erase both parts instead of preserving the ratio.
The math uses exact fraction arithmetic, so a large whole number such as 9007199254740993 keeps every digit instead of losing precision to floating point. Every part is stored internally as a numerator and a denominator, so a fraction such as 7/3 is never converted to an imprecise decimal along the way.
Questions
What is the ratio of 12 to 18?
To calculate a ratio, choose Simplify a ratio, enter First value (A) and Second value (B), then select Calculate. 12 to 18 simplifies to 2 to 3, because 6 is their greatest common divisor: the answer is 2 : 3, with 12 : 18 = 2 : 3 as the equation.
How to calculate a 3 to 1 ratio?
A 3 to 1 ratio means 3 parts of one thing per 1 part of the other, 4 parts total. To split 400, choose Find a missing value, enter 3, 4 and 400 as A, B and D, then solve for C: 300, leaving 100. To scale 3 : 1, choose Equivalent ratio; a factor of 4 gives 12 : 4.
What happens if one part of the ratio is zero?
A ratio with one zero part, such as 0 : 5, is accepted and simplifies to 0 : 1, keeping the zero in place; 5 : 0 simplifies to 1 : 0 the same way. Only both parts being zero is rejected, as the Limits section explains. Enter a nonzero value in at least one of the two parts.
Do negative numbers work in this calculator?
Yes. Enter a negative value with a leading minus sign, such as -2, in any field; the result keeps the sign as described above. This works in every field, for Simplify, Equivalent ratio and Find a missing value alike, so a negative First value (A), Second value (B) or scale factor all parse the same way.
Can I enter fractions or decimals instead of whole numbers?
Yes. The calculator converts each entry to an exact fraction before simplifying, so 0.1 : 0.3 is read as 1/10 : 3/10 and reduces to the exact result 1 : 3, with no rounding. A whole number works the same way; the calculator treats it as that number over one before comparing the two fractions.