Steps to calculate aspect ratio
- Write the pixel width and height.
- Find the GCD of those two integers (Euclidean algorithm).
- Divide both by the GCD.
- Optionally compute the decimal W÷H to four places.
- If the simplified pair is uncommon, compare it with the standard list using relative error.
Worked examples
1920×1080 → GCD 120 → 16:9, decimal 1.7778, 2.0736 MP.

1366×768 → GCD 2 → 683:384. Relative error versus 16:9 is about 0.05%, so the badge reads ≈ 16:9.
Those results are produced by lib/calc.mjs at build time, the same module the browser uses.
When the fraction is not a name anyone uses
How to calculate aspect ratio is only half the job when the greatest common divisor leaves a pair nobody recognises. 1920×1080 becomes 16:9, which a platform already understands. 1366×768 becomes 683:384. That second result is exact. A nearest badge of 16:9 is about 0.05% off, fine as a “close enough” label and wrong if you must cut pixels to a named frame.
Keep the exact fraction when you are resizing one side and the other must follow. Switch to a named ratio, such as 16:9 or 4:3, only when a screen or an upload asks for that shape. The form on this page shows the simplified pair first, then the nearest named ratio when the gap is small enough to mention.
On paper
You can list factors or use repeated subtraction. For video sizes the greatest common divisor is usually large (120, 160, 8). For 1366×768 the leftover 683:384 is the honest answer. Do not force 16:9 if you need exact pixels.
After you have the ratio
Resize with H′ = W × rh/rw. Convert with the crop and pad rules. Both are on the formula guide.
A pencil-and-paper walkthrough
Write 1920 and 1080. 1920 − 1080 = 840. 1080 − 840 = 240. 840 − 240 × 3 = 120. 240 − 120 × 2 = 0. GCD is 120. 1920÷120 = 16, 1080÷120 = 9. That Euclidean trail is what the engine runs, just faster.
For 1366×768 the same trail ends at 2. You are left with 683:384. Calling it 16:9 is a nearest-badge decision, not a GCD decision. This how-to page is about the honest fraction first.
Frequently asked questions
What is the short version?
Divide both sides by their greatest common divisor.
What is the GCD of 1920 and 1080?
120.
Why is 1366×768 not 16:9?
It simplifies to 683:384. 16:9 is only the nearest named ratio.
Do I round the decimal?
This site shows four decimal places.
Can I calculate from a decimal?
Yes. Use the custom aspect ratio calculator.