Ratio Calculator
Simplify ratios, scale them and solve proportions.
About the Ratio Calculator
The ratio calculator solves proportions of the form A : B = C : D. Given any three of the four values, it computes the missing fourth value and verifies the result by checking that the cross-products are equal (A times D equals B times C). It also simplifies the ratio A : B to lowest terms so you can see the underlying relationship at a glance.
Ratios are the language of proportion. Recipes, maps, architectural drawings, financial ratios, and mixing problems all rely on the idea that two quantities are in a fixed relationship. When you scale a recipe from four servings to ten, you are solving a ratio problem. When you read a map with a 1:25000 scale, you are interpreting a ratio.
The calculator accepts any numeric inputs, including decimals and negative values, and it gracefully handles the case where you leave one field blank to indicate the unknown. The simplification uses the greatest common divisor of the rounded inputs, so ratios with decimal components are still reduced to a clean form when possible.
How It Works
A proportion A : B = C : D expresses that the ratio of A to B equals the ratio of C to D. By the rule of cross-multiplication, this means A times D equals B times C:
A / B = C / D implies A * D = B * C
Solving for any one of the four values uses the same equation rearranged:
Solve for A: A = (B * C) / D
Solve for B: B = (A * D) / C
Solve for C: C = (A * D) / B
Solve for D: D = (B * C) / A
After solving, the calculator simplifies the ratio A : B by dividing both terms by their greatest common divisor. The GCD is computed on the inputs scaled up by a million to handle decimal values: for example, the ratio 1.5 : 2 is treated as 1500000 : 2000000, whose GCD is 500000, giving the simplified ratio 3 : 4.
The cross-check A*D = B*C is displayed as a verification. If the two products are equal (allowing for floating-point rounding), the proportion holds; if not, something went wrong in the calculation. This is the same check that has been used to verify proportions since the time of Euclid.
Worked Examples
Using the default inputs A = 3, B = 4, D = 8 with C left blank, the calculator solves for C using C = (A * D) / B = (3 * 8) / 4 = 6. The full proportion is 3 : 4 = 6 : 8, and the cross-check confirms that 3 * 8 = 24 equals 4 * 6 = 24.
The simplified ratio A : B is 3 : 4 (already in lowest terms), and the decimal ratio is 0.75. This means A is three-quarters of B, and the same relationship holds between C and D: 6 is three-quarters of 8.
For a real-world example, suppose a recipe calls for 2 cups of flour to make 12 muffins, and you want to scale it to 30 muffins. Set A = 2, B = 12, D = 30, leave C blank, and the calculator gives C = (2 * 30) / 12 = 5 cups of flour. The proportion 2 : 12 = 5 : 30 confirms the scaling is correct.
When to Use This Tool
Use the ratio calculator whenever you need to scale or compare quantities:
- Scaling a recipe up or down for a different number of servings.
- Reading a map with a stated scale, such as 1:25000.
- Mixing fuel, paint, or chemicals in a stated ratio, such as 1:50 oil-to-petrol.
- Computing financial ratios such as price-to-earnings or debt-to-equity.
- Scaling architectural or engineering drawings.
- Solving word problems in a mathematics or chemistry course.
- Converting between aspect ratios for image or video editing.
Limitations & Disclaimer
This calculator solves proportions with exactly one unknown. It does not handle ratios with three or more terms (such as A : B : C), compound ratios, or weighted averages. The simplification uses the GCD of inputs scaled by a million, which may produce slightly non-integer results for inputs with more than six decimal places. For complex proportional reasoning, consult a mathematics reference. See our disclaimer for full details.
Frequently Asked Questions
What is a proportion?
A proportion is a statement that two ratios are equal, written as A : B = C : D. It expresses that the relationship between A and B is the same as the relationship between C and D. Proportions can be solved for any one unknown value using cross-multiplication.
How does cross-multiplication work?
Cross-multiplication converts the proportion A / B = C / D into the equation A * D = B * C, which has no fractions. This makes it easy to solve for any one of the four values by rearranging. The technique is valid because multiplying both sides of an equation by the same non-zero quantity preserves the equality.
Can the inputs be decimals or fractions?
Yes. The calculator accepts any numeric values, including decimals and negative numbers. When simplifying the ratio A : B, the inputs are scaled up by a million to handle decimals before the greatest common divisor is computed, so ratios like 1.5 : 2 are correctly simplified to 3 : 4.
What if I leave more than one field blank?
The calculator requires exactly three known values and one unknown. If you leave zero, two, three, or four fields blank, it reports an error and asks you to leave exactly one blank. This prevents ambiguous or under-determined calculations.
Why simplify the ratio A:B?
Simplification reveals the underlying relationship between the two quantities. The ratio 6 : 8 and the ratio 3 : 4 represent the same proportion, but 3 : 4 is easier to read and compare. Simplifying also makes it obvious when two ratios are equivalent.
What happens with zero inputs?
Dividing by zero is not allowed, so if the field you are solving for depends on a zero denominator, the calculator produces an infinite or undefined result. In practice, ratios with zero terms are rare and usually indicate an error in the problem setup.
Last updated: July 21, 2026 · Author: HT99 Tools Editorial Team · Reviewed by: HT99 Tools Editorial Team