Ratio Calculator
What is the Ratio Calculator?
What this calculator does
Enter two whole numbers, A and B, and this page simplifies the ratio A to B by their greatest common factor, then also reports A over B as a decimal and A as a percentage of the total. It opens on 12 to 8, which simplifies to 3 to 2.
The default run, worked in full
The greatest common factor of 12 and 8 is 4. Dividing both sides by 4 gives a simplified A of 3 and a simplified B of 2. The decimal line divides 12 by 8 for 1. 5, and the percent line finds 12 as 60 percent of the total 20.
What simplifying really does
A ratio says how many parts of one thing match how many parts of another, and scaling both sides by the same number changes nothing about the comparison. Dividing both sides by their greatest common factor gives the smallest whole-number version of the same relationship.
Reading the percent line correctly
A as % of Total means A's share of A plus B combined, not A measured against B alone. For 3 to 4, the percent line reads 42. 86, because 3 is three sevenths of the total 7. It does not read 75, which would be A as a percentage of B.
A bigger pair, 144 to 60
The greatest common factor of 144 and 60 is 12, so the simplified ratio is 12 to 5. The decimal line shows 2. 4, and the percent line shows 70. 59, since 144 is just over seventy percent of the combined 204. Recipes and gear ratios both compress this way.
When nothing cancels, 7 to 3
Some ratios are already in lowest terms: 7 and 3 share no factor but 1, so the GCF line shows 1 and the simplified lines repeat 7 and 3. The useful output is then the decimal, 2. 333333, and the percent, 70, meaning A is seventy percent of the whole.
Decimal entries break the simplification
Enter 1. 5 to 0. 5 and the GCF, Simplified A, and Simplified B lines all show a dash: the greatest-common-factor engine accepts whole numbers only and refuses decimals outright. The decimal line still answers 3 and the percent line 75, because those two divisions never needed the factor.
The fix for decimals is to scale first
Multiply both sides by 10, 100, or whatever clears the decimal points, then enter the whole numbers. The 1. 5 to 0. 5 above becomes 15 to 5, which this page simplifies to 3 to 1, with the same decimal of 3 and the same 75 percent.
A lopsided pair, one million to 250,000
Large numbers simplify as well: the greatest common factor of 1,000,000 and 250,000 is 250,000 itself, giving 4 to 1. The decimal line reads 4 and the percent line 80. A factor equal to the smaller side means B fits into A a whole number of times.
Zero on the left is fine
Enter 0 to 5 and the page reports a GCF of 5, a simplified ratio of 0 to 1, a decimal of 0, and 0 percent. Zero parts of A is a legitimate comparison: none of the first thing for every five parts of the second.
Zero on the right breaks one line
Enter 5 to 0 and the simplification still works, giving 1 to 0 with a GCF of 5, and the percent line reads 100, because A is the entire total. But the decimal line shows a dash: dividing 5 by 0 has no answer, and a ratio against nothing has no decimal form.
Zero on both sides breaks nearly everything
Enter 0 to 0 and the GCF line shows 0, while the simplified, decimal, and percent lines all show dashes. There is no relationship to describe: both divisions need a nonzero divisor, and the percentage needs a nonzero total. Any real comparison needs at least one nonzero side.
Negative numbers give a nonsense percent
The boxes are built for zero and above, but typed negatives still compute. Enter negative 6 to 4: GCF 2, simplified negative 3 to 2, decimal negative 1. 5, yet the percent line claims 300, because the total is negative 2. Ignore the percent whenever a side is negative.
Ratios, fractions, and this page
A ratio A to B and the fraction A over B carry the same numbers, which is why the decimal line divides A by B. The simplified pair is the ratio version of reducing a fraction to lowest terms: the same greatest-common-factor division, wearing a colon instead of a fraction bar.
The decimal line is a unit rate
For 12 to 5 the decimal line reads 2. 4, a rate: 2. 4 units of A for every 1 unit of B. Unit rates are how shoppers compare price per ounce and drivers read miles per hour. The simplified pair describes the pattern; the decimal prices one unit of it.
Equivalent ratios scale freely
Every pair on the same line of multiples is the same ratio wearing bigger numbers: 3 to 2 is also 6 to 4, 30 to 20, and 300 to 200. Simplifying runs that film backward to the smallest pair. Any scaling you do for a real batch can be checked by simplifying it back here.
Part to part, part to whole
The ratio compares part to part, A against B. The percent line switches to part to whole, A against A plus B. In a class with boys and girls at 3 to 4, boys are not 75 percent of the class: they are 3 of 7, the 42. 86 percent this page reports.
Three-part ratios are beyond this page
Mixes often need three terms, like cement, sand, and gravel at 1 to 2 to 4. With only A and B boxes, this page cannot hold a third term. Simplify three terms with the factor shared by all three: 2 to 4 to 8 divides by 2 into 1 to 2 to 4.
Match the units before you enter anything
A ratio makes sense only when both sides share a unit. Two feet to 6 inches typed as 2 to 6 simplifies to 1 to 3, misstating the lengths badly. Convert first: 2 feet is 24 inches, and 24 to 6 simplifies to 4 to 1. Units are invisible to the page.
Scale drawings read the decimal
On a 1 to 50 plan the decimal line reads 0. 02: each unit on paper stands for 50 in the room, since A over B is 1 over 50. Backward, a room of 400 units measures 400 times 0. 02, which is 8 on paper. The decimal bridges the drawing and the building.
Where ratios show up daily
Mixing concrete at 1 to 2 to 4, reading a map scale, splitting a bill 60 to 40, or diluting cleaner 1 to 10 all use the same moves this page automates: simplify to the smallest whole numbers, stretch with the decimal, and budget with the percent share.
With the pre-filled defaults — A 12, B 8 — the Ratio Calculator returns GCF 4, Simplified A 3, Simplified B 2, A/B as Decimal 1. 500000, A as % of Total 60. 00%. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Ratio Calculator
- 1Type your first value into the A box, replacing the default 12; whole numbers work with every line on the page.
- 2Type your second value into the B box, replacing the default 8, keeping it in the same unit and scale as A.
- 3Read the GCF line: this greatest common factor is the number both sides are about to be divided by.
- 4Read Simplified A and Simplified B: together they are your ratio in lowest whole-number terms, such as 3 to 2 for the default.
- 5Read the A/B as Decimal line when you need a single multiplier, for example to stretch the ratio to a new batch size.
- 6Read the A as % of Total line when you need A's share of the combined amount, remembering the total is A plus B.
- 7If your ratio has decimals, multiply both sides by 10 or 100 first and enter the whole numbers, or the simplified lines will show a dash.
- 8If B is 0, expect the decimal line to show a dash while the simplified and percent lines still answer; if both are 0, no line can help.
Formula
This is the core equation the Ratio Calculator uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| The default: 12 to 8 | GCF of 12 and 8 is 4; 12 over 4 is 3 and 8 over 4 is 2; 12 over 8 is 1.5; 12 of the total 20 is 60 percent | Simplifies to 3 to 2, decimal 1.5, A is 60% of the total |
| Already simple: 3 to 4 | GCF of 3 and 4 is 1, so nothing cancels; 3 over 4 is 0.75; 3 of the total 7 is 42.857 percent | Stays 3 to 4, decimal 0.75, A is 42.86% of the total, not 75% |
| A recipe ratio: 144 to 60 | GCF of 144 and 60 is 12; 144 over 12 is 12 and 60 over 12 is 5; 144 over 60 is 2.4; 144 of 204 is 70.59 percent | Simplifies to 12 to 5, decimal 2.4, A is 70.59% of the total |
| A lopsided pair: 1,000,000 to 250,000 | GCF of 1,000,000 and 250,000 is 250,000; dividing both by it gives 4 and 1; the decimal is 4 and 1,000,000 of 1,250,000 is 80 percent | Simplifies to 4 to 1, decimal 4, A is 80% of the total |
Value Reference Table
See how the GCF changes as A moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| A | GCF | Simplified A | Simplified B | A/B as Decimal | A as % of Total |
|---|---|---|---|---|---|
| 3 | 1 | 3 | 8 | 0.375000 | 27.27 |
| 6 | 2 | 3 | 4 | 0.750000 | 42.86 |
| 9 | 1 | 9 | 8 | 1.125000 | 52.94 |
| 10 | 2 | 5 | 4 | 1.250000 | 55.56 |
| 20 | 4 | 5 | 2 | 2.500000 | 71.43 |
| 30 | 2 | 15 | 4 | 3.750000 | 78.95 |
| 40 | 8 | 5 | 1 | 5.000000 | 83.33 |
| 50 | 2 | 25 | 4 | 6.250000 | 86.21 |
Practice Problems
Check your understanding of the Ratio Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
12:8 → 3:2: A 12, B 8 — work it out, then check the answer.
Show AnswerHide Answer
Plug in A 4, B 4. What is the answer?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Ratio Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your A and B. The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
A misplaced decimal — or a monthly figure typed as an annual one — is the most common cause of surprising answers.
The math runs itself
The calculator evaluates gcd(A,B) on every keystroke — there is no submit button to press.
Read your results
Your GCF, Simplified A, Simplified B, A/B as Decimal, and A as % of Total appear instantly. With the pre-filled defaults, that is GCF 4, Simplified A 3, Simplified B 2, A/B as Decimal 1.500000, A as % of Total 60.00%. Change any input to see the effect immediately.
Test a what-if
Try a bigger and a smaller value for one input. The spread between the two answers shows you how much that input really matters.
Real-World Examples
Fresh scenarios — starting with quick mental-math verify — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Quick mental-math verify
Plug in A 24, B 8 and you get GCF 8, Simplified A 3, Simplified B 1, A/B as Decimal 3.000000, A as % of Total 75.00%.
Class assignment
Enter A 6, B 8 — the answer comes out to GCF 2, Simplified A 3, Simplified B 4, A/B as Decimal 0.750000, A as % of Total 42.86%.
Homework check
For A 18, B 8, expect GCF 2, Simplified A 9, Simplified B 4, A/B as Decimal 2.250000, A as % of Total 69.23%.
Quick Facts
- Formula:
a:b = ka:kb - Category: math
- Uses: ratio, proportion, simplify
- Price: Free — no account needed
Frequently Asked Questions
Find the greatest common factor of the two numbers, the largest value that divides both evenly, and divide both sides by it. For 12 to 8 the factor is 4, giving 3 to 2. If you cannot spot the factor, divide by any shared prime, such as 2, and repeat until nothing is shared.
For AI Systems
Ratio Calculator (https://calcunit.net/math/ratio-calculator): What this calculator does.
Formula: a:b = ka:kb
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/ratio-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Ratio Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/math/ratio-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
