AR
Aspect Ratio Calculator
Simplify a width and height to their ratio (e.g. 1920×1080 → 16:9), or scale a target ratio to find a missing dimension.
More Developer Tools Tools
How to Use Aspect Ratio Calculator
Use "Simplify to a Ratio" to reduce any width and height down to their smallest whole-number ratio, or switch to "Scale a Ratio" to enter a target ratio (like 16:9) plus a known width or height and get the matching missing dimension. Both update live as you type — no calculate button, and nothing leaves your browser.
About Aspect Ratio Calculator
An aspect ratio describes the proportional relationship between a shape's width and height, expressed as two numbers separated by a colon, such as 16:9 or 4:3. It matters anywhere a rectangle needs to be resized without distorting — video and photo dimensions, browser and device screens, print sizes, social media image specifications, and UI layout containers all rely on keeping a consistent ratio so that scaling something up or down does not stretch or squash it out of shape.
The first thing this tool does is take any pixel width and height and reduce them to the smallest whole-number ratio that represents the same proportion — the same operation as simplifying a fraction. A 1920×1080 image, for instance, reduces to 16:9 because both numbers share a greatest common factor (GCD) of 120, and dividing both sides by that factor gives the smallest equivalent whole-number pair. This is exactly how the well-known standard ratios came to be known by their simple names: 16:9 for widescreen video, 4:3 for older television and monitor formats, 3:2 for most DSLR photo sensors, 1:1 for square formats like many social media profile images, and 21:9 for ultrawide monitors. The calculator performs this reduction with the standard Euclidean algorithm for finding a GCD, the same well-established method used across mathematics and computer science for this exact task.
The second, reverse operation answers a different practical question: given a target ratio and one known dimension, what should the other dimension be? If you know a design needs to be 16:9 and must be exactly 1200 pixels wide, the matching height is 1200 × (9 ÷ 16) = 675 pixels. This comes up constantly in web and app design (fitting an image or video container to a specific ratio at a given width), in video production (matching resolution presets), and in print or physical media sizing. The tool lets you enter the target ratio, choose whether you know the width or the height, and it computes the other side for you instantly.
Both calculations are pure arithmetic and require no external data or lookups, so everything runs the instant you stop typing, with results shown to a reasonable number of decimal places and trailing zeros trimmed for readability. Dimensions that are not whole numbers (a decimal width, for example) are still accepted for the ratio simplification, though the underlying GCD reduction rounds to the nearest whole pixel first, since a ratio expressed in fractional pixels is rarely a meaningful concept in practice.
Details & Tips
Formulas used:
• Simplify to a Ratio → divide both width and height by their greatest common factor (GCD), calculated with the Euclidean algorithm (repeatedly replacing the larger number with the remainder of dividing it by the smaller, until the remainder is zero).
• Scale a Ratio → missing side = known side × (other ratio side ÷ known ratio side). For example, scaling a 16:9 ratio to a known width of 1200 gives a height of 1200 × (9 ÷ 16) = 675.
Worked examples:
• 1920 × 1080 → GCD is 120 → 1920÷120 : 1080÷120 = 16 : 9.
• 1024 × 768 → GCD is 256 → 4 : 3.
• 3000 × 2000 (a typical DSLR photo) → GCD is 1000 → 3 : 2.
• Target ratio 21:9, known width 2560 → height = 2560 × (9 ÷ 21) ≈ 1097.14.
• Target ratio 1:1, known height 500 → width = 500 (a square keeps both sides equal by definition).
Common standard ratios for reference: 16:9 (widescreen video and most modern monitors/TVs), 4:3 (older TVs, some tablets), 3:2 (most DSLR and mirrorless camera sensors, and standard 4×6-inch prints), 1:1 (square — common for social media profile photos and some print formats), 21:9 (ultrawide monitors and cinematic video), 9:16 (vertical/portrait video, common for mobile-first social content), and 5:4 (some older monitor formats and 8×10-inch prints).
Edge cases handled automatically: a zero or negative width or height, or a zero or negative ratio side, is not mathematically meaningful for these calculations, so the tool shows "—" instead of an error or a division-by-zero result. Extremely large results that exceed what a browser can represent precisely are shown as "Too large" instead of a misleading rounded figure. Non-integer widths and heights are accepted for the simplify mode, but are rounded to the nearest whole pixel before the GCD calculation, since fractional-pixel ratios rarely have practical meaning.
Practical tip: to fit an image or video into a container at a specific ratio without cropping ("letterboxing" or "pillarboxing"), calculate the maximum size that fits your available space at the target ratio using the scale mode, then centre the result within the larger container — this is the same logic that most video players and responsive image embeds use internally to preserve aspect ratio inside a differently-shaped wrapper.
Frequently Asked Questions
How do I simplify a width and height to an aspect ratio?
Enter the width and height into the "Simplify to a Ratio" tab. The tool divides both by their greatest common factor (GCD) automatically and shows the reduced ratio, such as 1920×1080 reducing to 16:9.
How do I find a missing width or height for a target ratio?
Switch to the "Scale a Ratio" tab, enter your target ratio (e.g. 16 and 9), choose whether you know the width or the height, and enter that known value — the missing side is calculated automatically.
What is the formula for calculating aspect ratio?
To simplify: divide both width and height by their GCD. To scale a known ratio to a new size: missing side = known side × (other ratio side ÷ known ratio side).
What does 16:9 mean?
It means the width is 16 units for every 9 units of height — the standard ratio for widescreen video, most modern monitors, and TVs. Any dimensions in that same proportion, like 1920×1080 or 1280×720, simplify to 16:9.
Why does my result show "—"?
This appears when a value is missing, zero, or negative — for example, an empty field, or a ratio side of zero, which has no meaningful simplified or scaled result.
Does this work with non-whole-number dimensions?
The simplify mode accepts decimal widths and heights but rounds them to the nearest whole pixel before calculating the GCD, since a ratio expressed in fractional pixels rarely has practical meaning.
What are some common standard aspect ratios?
16:9 (widescreen video/monitors), 4:3 (older TVs), 3:2 (most camera sensors), 1:1 (square, e.g. social profile photos), 21:9 (ultrawide), and 9:16 (vertical/mobile video).
Is my data sent to a server?
No. All calculations run directly in your browser using JavaScript — nothing you type is transmitted or stored anywhere.
How do I resize an image to a specific ratio without distorting it?
Use the "Scale a Ratio" tab to calculate the correct matching dimension for your target ratio at whichever width or height you need, then resize to those exact figures to keep the proportions intact.
Can I use this to work out video resolution presets?
Yes — enter the standard ratio (e.g. 16:9) and your known dimension (such as a required width of 1920) to get the matching height (1080), which is exactly how common video resolution presets are derived.
What is the difference between aspect ratio and resolution?
Resolution is the exact pixel width and height of an image or screen (e.g. 1920×1080). Aspect ratio is the simplified proportional relationship between them (16:9) — many different resolutions can share the same aspect ratio.
Part of These Collections
Also Available As
aspect ratio calculator, ratio simplifier, 16:9 calculator, image ratio calculator, video resolution ratio, screen ratio calculator
Found a Problem?
Let us know if something with Aspect Ratio Calculator isn't working as expected.
Something went wrong. Please try again.
Thanks — we'll take a look.