Aspect Ratio Calculator
Solve the missing width or height for any ratio, or reduce a width × height in pixels to its simplest ratio.
The other dimension
Simplest ratio
Proportion is the quiet half of responsive layout
Whether you are sizing a hero image, embedding a video, or reserving space for a media card, the aspect ratio is what keeps things from stretching or jumping as the viewport changes. Get one dimension from the other at a fixed ratio and your content scales cleanly on every screen instead of distorting.
The two calculators here cover both everyday jobs: work out the partner dimension for a known ratio, or take a raw pixel size and see what clean ratio it actually is — useful when a design file hands you 1920×1080 and you want to confirm it is 16:9 before committing it to CSS.
Frequently Asked Questions
How do I find the missing dimension for an aspect ratio?
Multiply across the ratio. For a target ratio of W:H, height = width × H ÷ W, and width = height × W ÷ H. At 16:9, a 1280px width gives 1280 × 9 ÷ 16 = 720px of height. This tool does that in both directions for you.
How do you simplify a resolution to a ratio?
Divide both the width and height by their greatest common divisor (GCD). For 1920×1080 the GCD is 120, so the ratio reduces to 16:9. For 1280×1024 the GCD is 256, which gives 5:4. The calculator computes the GCD with Euclid's algorithm.
What are the most common aspect ratios?
16:9 is standard for video and most screens; 4:3 is classic displays and many photos; 1:1 is square (social avatars and posts); 3:2 is common in photography; and 21:9 is ultrawide. Knowing the ratio lets you scale content to any size while keeping the same proportions.
Why does keeping the aspect ratio matter in responsive design?
If you resize an image or video without preserving its ratio it stretches or squashes. In CSS the aspect-ratio property (or a padding-based box) reserves the right proportional space so media scales cleanly and does not cause layout shift as it loads.
Can the ratio parts be non-integers?
For solving a dimension, yes — you can enter any positive ratio and known length. For simplifying a size to a ratio, the width and height must be whole pixels, because the greatest-common-divisor reduction only makes sense for integers.
This is a helper that gives estimates — verify against your design system and how the media renders in your real layouts before relying on the figures.