01What is Ratio Calculator?
Ratios turn up constantly in front-end work and in the kitchen. You need them for screen sizes, image crops, scale drawings and paint mixes. This calculator gives you two separate panels for the two questions people usually ask. The Simplify Ratio panel reduces A : B to lowest terms. It divides both numbers by their greatest common divisor, found with Euclid's algorithm. So 1920 : 1080 becomes 16 : 9, and 2560 : 1080 becomes 64 : 27. Decimals are handled by first scaling both values by a power of ten, based on the longer decimal part. Then it rounds them to whole numbers and reduces. That is how 1.5 : 2.25 turns into 150 : 225 and then 2 : 3. Under the result you also get the ratio as a single decimal, A ÷ B, rounded to six places with trailing zeros dropped. A copy button grabs the simplified form as plain text, like 16:9. The Solve Proportion panel answers A : B = C : ?. It cross-multiplies, so the missing value is B × C ÷ A, and the formula sits on the page so you can check it. Say you have a 1920 × 1080 video and want it 1280 pixels wide. Enter 1920, 1080 and 1280, and the answer is 720. Results show up to six decimal places with commas for thousands, so 16 : 9 = 3840 : ? reads 2,160. Both panels recalculate as you type, and a Reset button clears every field. Nothing leaves your browser, since the math runs right in the page. Now the edges. A zero in either Simplify box shows no result, and so does a zero in the first box of Solve Proportion, since you can't divide by it. Negative numbers are accepted, and the sign carries to the first term, so −4 : 6 simplifies to −2 : 3. Very long decimals are bounded by normal JavaScript number precision. The tool works with two-term ratios only. For a three-part mix like 2 : 3 : 5, multiply each part by the same factor yourself. Also note that marketing names don't always match the reduced form. A 1920 × 1200 screen reduces to 8 : 5, which is the same shape as 16 : 10.
Front-end developers and designers sizing media, plus anyone scaling a drawing, recipe or mix who wants the cross-multiplication done for them. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Ratio Calculator
- In the Simplify Ratio panel, type your two values into A and B
- Read the Simplified Ratio and the As decimal line underneath
- In the Solve Proportion panel, enter A, B and C for A : B = C : ?
- Read the Missing Value (?) result, worked out with ? = (B x C) / A
- Use the copy buttons to take either result, or click Reset to clear all fields
03Worked examples
- Input:
Simplify 1920 : 1080 - Result:
16 : 9, as decimal 1.777778 - Both values are divided by their GCD, 120.
- Input:
Simplify 2560 : 1080 - Result:
64 : 27, as decimal 2.37037 - Trailing zeros are trimmed from the decimal.
- Input:
Simplify 1.5 : 2.25 - Result:
2 : 3, as decimal 0.666667 - Scaled to 150 : 225 first, then reduced.
- Input:
Simplify -4 : 6 - Result:
-2 : 3, as decimal -0.666667 - The sign stays on the first term.
- Input:
Solve 1920 : 1080 = 1280 : ? - Result:
720 - Keeps a 16:9 frame when resizing to 1280 wide.
- Input:
Solve 3 : 5 = 2 : ? - Result:
3.333333 - Non-terminating results are rounded to six decimal places.
04Common use cases
- Reducing a screen or video resolution to its aspect ratio, such as 2560 × 1080 to 64 : 27
- Working out the height that keeps an image's proportions when you set a new width in CSS
- Scaling a recipe from 4 servings to 10 by solving 4 : 250 g = 10 : ?
- Converting a 1 : 50 scale drawing measurement to a real-world length
- Checking that a design token for an aspect-ratio box matches the source asset
- Turning a decimal mix like 1.5 : 2.25 into a clean whole-number ratio for instructions
05Tips
- Put the known pair in A and B and your new number in C. Swapping B and C gives a different, usually wrong, question.
- 1920 × 1200 reduces to 8 : 5. Marketing calls it 16:10, but it's the same shape.
- When scaling a three-part ratio by hand, multiply every term by the same factor: 2 : 3 : 5 times 4 is 8 : 12 : 20.
- Simplify results never drop the decimals you typed. Enter 0.75 : 1.5 and you get 1 : 2, not a rounded approximation.
06Related concepts
Proportion, Aspect ratio, Greatest common divisor, Euclidean algorithm, Scale factor, Cross-multiplication.
Frequently Asked Questions
What is Ratio Calculator?
Ratio Calculator is a free, browser-based developer tool on AIDToolStack. Calculate and simplify ratios, find equivalent ratios and missing values. It requires no installation or sign-up and works entirely in your browser.
Is Ratio Calculator free to use?
Yes. No sign-up, no fees and no usage cap.
Does Ratio Calculator store my data?
No. It runs in your browser; nothing is uploaded.