Ratio Calculator
This ratio calculator reduces two positive whole-number parts to their simplest form and divides a target total in that proportion. It finds the greatest common factor first, then calculates each allocation from its share of the combined parts.
By Dr. Hassan Khames EliwaLast updated
Result
- First allocation
- 30
- Second allocation
- 40
How it works
Reduce parts without changing the relationship
A ratio describes how two quantities compare, not how large either quantity must be. For parts a and b, dividing both by their greatest common factor gives the simplest whole-number expression. The order matters: a ratio of paint pigment to binder is not interchangeable with binder to pigment. Label the quantities before entering numbers, especially when transferring a recipe or a specification between colleagues.
The calculator accepts positive integer parts up to one billion. These restrictions keep reduction exact with ordinary JavaScript integers and avoid an ambiguous interpretation of decimal ratio entries. If a specification says 1.5 to 2, multiply both terms by ten and enter 15 and 20. This expresses the same relationship without asking the calculator to infer a rounding convention.
Allocate a combined total
The first allocation is total × a ÷ (a + b). The second is total × b ÷ (a + b). These are part-to-whole shares derived from a part-to-part ratio. A ratio of three to four therefore assigns three sevenths, not three quarters, of the total to the first item. The target may be a decimal quantity and is limited to one trillion.
No physical unit is imposed. If the target is measured in kilograms, both allocations are kilograms; if it represents a budget, both are amounts in the same currency. Convert unlike quantities before calculating. A mass-to-volume instruction needs density information and cannot be treated as a dimensionless mixing ratio merely because both inputs are numbers.
Worked example
Example 1: split a bulk mixture
A workshop uses 18 parts of one dry ingredient for every 24 parts of another. Enter 18, 24, and a target total of 70 kilograms. The common factor is six, so the simplified ratio is 3:4. There are seven combined parts; each represents ten kilograms. The first allocation is 30, and the second is 40. Those amounts add back to the requested 70 kilograms.
Example 2: distribute an equipment allowance
Two teams receive shares in the ratio 12 to 8 from an allowance of 150 units. Enter 12, 8, and 150. Dividing by four gives 3:2. The calculator returns 90 for the first allocation and 60 for the second. Reducing the ratio changes its notation, not the distribution. Reversing the input order would reverse which team receives each amount, so preserve the labels in your record.
Expert tips
Common mistakes
- The target total covers both shares together. Entering only the desired first share as the total leaves too little to distribute and changes the question being answered.
- Subtracting the same amount from both terms changes their relationship. Simplification requires dividing both terms by a common factor, not making their difference smaller.
- A correct split does not establish that materials can safely be mixed. Check compatibility, handling instructions, and whether the specified proportions refer to mass or volume before using the result.
Frequently asked questions
Why are zero parts rejected?
This version models two present components. A zero component would describe a different allocation problem, so both parts must be positive whole numbers.
Can I enter decimal parts?
Convert finite decimals to equivalent whole-number terms first. For example, multiply both terms by the same power of ten, then enter those integers.
Does changing the total change the simplified ratio?
No. The simplest ratio depends only on the two part counts. Changing the target total scales the allocations without altering their relative size.
Why can rounded allocations look slightly inconsistent?
Results display up to six decimal places. Independent display rounding can create a tiny difference when you add the shown amounts; intermediate allocation calculations retain normal floating-point precision.
How is this different from a percentage?
A ratio compares the two components directly. A percentage compares one component with the combined whole. Use the percentage calculator when that whole-based view is the quantity you need.
Related calculators
Related guides
MathPercentages people get wrong: change, difference and pointsThe denominator determines the answer. Learn to distinguish percentage change, symmetric difference and percentage-point movements.14 November 2026 · 7 min read
MathStandard deviation without the jargonThe average tells you the centre. Standard deviation helps describe the spread, provided you know what the data represents.14 November 2026 · 7 min readSources and standards
About the author
Dr. Hassan Khames Eliwa holds a PhD in Construction & Built Environment and has more than 20 years of international project controls experience. He is Director of Eliwa Project Controls Limited in Auckland and founder of PMMilestone.org and PMMilestone.com.
Buy me a coffee