Ratio Calculator
With first term 1920, second term 1080, third term, to solve a proportion 1280, ratio comes to 1 7/9 — in simplest terms. It is reached in 7 steps, the last of which is a / (b + (b == 0 ? 1 : 0)), and each one is printed on the page with its numbers filled in. The formula is the one published by Euclid, Elements VII.2, not an approximation fitted to it.
Reduce a ratio to simplest terms, restate it as 1 : n, and solve a proportion for its missing term.
By Alex Seote, Built and maintains Rule Calculator · Formula and sources checked · How we check
First term 1920, Second term 1080, Third term, to solve a proportion 1280
1 7/9
In simplest terms for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.
It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.
- Greatest common divisor
max(1, gcd(abs(a), abs(b)))120- First term in simplest form
a / divisor16- Second term in simplest form
b / divisor9- As a single number
a / (b + (b == 0 ? 1 : 0))1.778- The second term when the first is 1
(b + (b == 0 ? 1 : 0)) / (a + (a == 0 ? 1 : 0))0.563- First term as a share of the whole
a + b == 0 ? 0 : a / (a + b) * 10064 %- The fourth term, where a : b = c : ?
b * c / (a + (a == 0 ? 1 : 0))720
Worked example
A 1920 by 1080 screen reduces to 16 : 9 — both numbers divide by 120. Setting the third term to 1280 solves the proportion for 720, which is why 1280 by 720 fills the same frame exactly.
How to work it out yourself
- 1.Put the two terms in the first two fields, in the order you say them: 3 to 1 is a 3 and a 1.
- 2.The greatest common divisor is what both terms divide by to reach simplest form. A divisor of 1 means the ratio was already there.
- 3.To scale a ratio, type the new first term into the third field. The missing fourth term keeps the proportion exact.
The formula
- Greatest common divisor
max(1, gcd(abs(a), abs(b))) - First term in simplest form
a / divisor - Second term in simplest form
b / divisor - As a single number
a / (b + (b == 0 ? 1 : 0)) - The second term when the first is 1
(b + (b == 0 ? 1 : 0)) / (a + (a == 0 ? 1 : 0)) - First term as a share of the whole
a + b == 0 ? 0 : a / (a + b) * 100 - The fourth term, where a : b = c : ?
b * c / (a + (a == 0 ? 1 : 0))
Source: Euclid, Elements VII.2 — the algorithm for the greatest common divisor
Questions people actually ask
- What aspect ratio is 1920 by 1080?
- 16 : 9. Both numbers divide by 120, which is their greatest common divisor, and 1920 ÷ 120 = 16 while 1080 ÷ 120 = 9. The same ratio covers 1280 by 720, 2560 by 1440 and 3840 by 2160, which is why content moves between those sizes without bars at the edges.
- Does 3 : 1 mean three quarters or three thirds?
- Three quarters. A ratio compares the parts to each other, not to the whole: 3 : 1 is four parts in total, three of them the first thing. That is 75%, and the share line above prints it, because reading a part-to-part ratio as a part-to-whole fraction is the mistake that ruins a concrete mix and a cocktail alike.
- How do I scale a recipe or a mix?
- Keep the ratio and solve for the term you do not know. If the mix is 4 : 1 and you have 6 litres of the first part, then 4 : 1 = 6 : x gives x = 1.5. Type the new first quantity into the third field and the fourth term is the amount to match it with.
- What is the difference between a ratio and a fraction?
- Notation, mostly, but the notation carries an assumption. 16 : 9 and 16/9 are the same number, 1.777…, and a reader treats the first as two quantities side by side and the second as one quantity divided by another. Ratios can also have more than two terms — 2 : 3 : 5 — and no fraction can.
- Why does the calculator show a "1 : n" form?
- Because that is how slopes, scales and odds are quoted. A map at 1 : 25,000, a gradient of 1 : 12, a mix of 1 : 3 — putting the first term at one makes two ratios directly comparable, which is exactly what simplest terms does not do: 16 : 9 and 21 : 9 are both in simplest form and it takes arithmetic to see that the second is wider.
Related
- Simplify Fractions CalculatorReduce a fraction to lowest terms, showing the greatest common divisor it was divided by.
- Fraction to Decimal CalculatorConverts fractions to decimals and back, to the nearest 16th, 32nd and 64th, with the millimetre equivalent.
- Percentage CalculatorWhat X% of a number is, plus the discounted price, the marked-up price and the remainder.
- Percentage Change CalculatorPercentage increase or decrease between two values, with the absolute difference and the multiplier.
Put this calculator on your site
Free, no attribution required beyond the link.
<iframe src="https://rulecalculators.com/embed/ratio" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="Ratio Calculator"></iframe>