Free aspect ratio calculator. Enter a ratio like 16:9 plus one dimension to get the other, or reduce any pixel size (e.g. 1920x1080) to its simplest ratio.
You have three of the four numbers and you need the fourth. The video is 16:9 and the container is 1280 px wide — how tall is it? The design calls for a 4:3 crop 1200 px tall — how wide? Someone handed you a 3440×1440 screenshot and asked what ratio it is. This calculator answers all three, and it does the arithmetic as you type rather than after you press a button.
It has two independent cards. The first solves a dimension from a known ratio: enter a ratio width and ratio height, then type into either the width or the height pixel field and the other one updates immediately. The second reduces a pixel size to its simplest whole-number ratio. Everything runs in your browser — the numbers you type are never sent anywhere, because there is nothing on the page that sends them.
An aspect ratio is just a fraction: width divided by height. If a shape has ratio rW:rH, then for any width you choose, the height that preserves the proportion is:
height = width × rH ÷ rWwidth = height × rW ÷ rHThose are the two formulas the first card runs, and which one it runs depends on which field you last touched. Type in the width box and it solves for height; type in the height box and it solves for width. It also shows the ratio as a single decimal — 16:9 displayed as 1.7778:1 — which is the number you actually compare when you want to know whether two sizes are the same shape.
Worked example, 16:9 at 1280 px wide:
1280 × 9 = 1152011520 ÷ 16 = 720Worked example in the other direction, 4:3 at 1200 px tall:
1200 × 4 = 48004800 ÷ 3 = 1600Worked example that does not come out clean, the 2.39:1 cinema preset at 1920 px wide. The preset is stored as 239:100, so the sum is 1920 × 100 ÷ 239 = 803.3473. There is no 803.3473-pixel-tall image. You round — 803 or 804 — and accept a fraction of a pixel of drift, which is invisible. The calculator displays results to four decimal places rather than silently rounding, so you can see when a ratio does not land on a whole pixel and decide yourself which way to go. Rounding to an even number is the usual choice, because several video encoders require even dimensions.
The second card goes the other way. Give it a width and height in pixels and it divides both by their greatest common divisor, which is the definition of reducing a fraction to lowest terms. 1920 and 1080 share a greatest common divisor of 120: 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9, so 1920×1080 is 16:9. A phone photo at 4032×3024 shares a divisor of 1008, giving 4032 ÷ 1008 = 4 and 3024 ÷ 1008 = 3 — a 4:3 image.
This is where the honest answers show up, and they are frequently not the round number people expect:
Two things worth knowing about how this card behaves. It expects whole pixel numbers and parses the inputs as integers, so a decimal entered there is truncated rather than honoured; if you need decimal precision, the first card handles it. And it labels a result with a friendly name only when the reduced pair exactly matches one it knows — 16:9, 4:3, 21:9, 1:1, 3:2, 9:16, 16:10, 5:4, 3:4. Because 2560×1600 reduces to 8:5 and not to 16:10, it comes back correctly reduced but unnamed. An absent name means “not in the list”, never “wrong answer”.
| Ratio | Decimal | Where it comes from | Example size |
|---|---|---|---|
| 16:9 | 1.7778 | The HD and UHD broadcast standard; the default shape of nearly all video | 1920×1080 |
| 4:3 | 1.3333 | Pre-HD television and early computer displays; still the native shape of most phone camera sensors | 1024×768 |
| 21:9 | 2.3333 | Marketing label for ultrawide monitors; real panels reduce to 64:27 (2560×1080), 43:18 (3440×1440) or 12:5 (3840×1600) | 3440×1440 |
| 1:1 | 1 | Square. Avatars, product tiles, and square social placements | 1080×1080 |
| 3:2 | 1.5 | The 35 mm film frame, inherited by most DSLR and mirrorless sensors | 3000×2000 |
| 9:16 | 0.5625 | 16:9 turned on its side — full-screen vertical video on a phone held upright | 1080×1920 |
| 16:10 | 1.6 | Laptop and tablet displays that want a little extra vertical room for toolbars | 2560×1600 |
| 2.39:1 | 2.39 | Anamorphic widescreen cinema; the source of the black bars on a film shown on a 16:9 screen | 1920×803 |
The first card ships seven of these as preset buttons — 16:9, 4:3, 21:9, 1:1, 3:2, 9:16 and 2.39:1. Clicking one fills the ratio fields and immediately recalculates the height from whatever width is already there, so you can hold a width fixed and click through presets to see how tall each shape would be. The ratio fields also accept anything you type, decimals included, so 2.35 and 1 is as valid as 235 and 100.
Stretching happens when the width and height are scaled by different factors. The fix is to pick one dimension and derive the other. If a 4032×3024 photo has to fit a 1200 px column, reduce it first to learn it is 4:3, then solve: 1200 × 3 ÷ 4 = 900. Export at 1200×900 and every proportion in the frame is preserved.
If the target box is a fixed width and a fixed height, you cannot satisfy both without either cropping or padding. Solve for both and take the smaller result:
This is the letterbox calculation, and it is two uses of the same formula. Put a 16:9 video in a 1024×768 (4:3) frame: scale it to the full width, so 1024 × 9 ÷ 16 = 576. The video occupies 1024×576 and the frame is 768 tall, so 768 − 576 = 192 pixels are empty — 96 above and 96 below. Those are the horizontal black bars.
The reverse produces vertical bars. Put 4:3 content in a 1920×1080 frame: scale to the full height, so 1080 × 4 ÷ 3 = 1440. The content is 1440×1080 inside a 1920-wide frame, leaving 1920 − 1440 = 480 pixels — 240 down each side. That is pillarboxing, and it is why old 4:3 footage sits in a column on a widescreen TV.
The rule that falls out of this: if the source ratio is wider than the container you get bars top and bottom; if it is narrower you get bars left and right. Compare the two decimal ratios and the larger number is the wider shape. This is exactly what CSS object-fit: contain does, and object-fit: cover is the crop version.
Rather than memorising a table of platform pixel sizes that changes without notice, work from the ratio the placement wants and then pick a pixel size on that ratio that is large enough. Full-screen vertical placements are 9:16 territory, feed images are commonly square or 4:5, and anything that plays as normal landscape video is 16:9. Once you know the ratio, the calculator gives you every size on it: at 9:16, a height of 1920 gives 1920 × 9 ÷ 16 = 1080, so 1080×1920. At the same ratio a height of 1280 gives 720×1280.
Two practical cautions. Exporting larger than the placement displays and letting the platform downscale usually looks better than exporting small and letting it upscale, because upscaling invents pixels that were never captured. And a size that is on the right ratio but tiny will still look soft — the ratio controls the shape, never the sharpness.
Both cards have a copy button — one copies the solved size, the other copies the reduced ratio — so the answer goes straight into your export dialog or your CSS without being retyped.
Select the 16:9 preset (or enter 16 and 9 as the ratio), then type your width in pixels. The height is calculated automatically using height = width x 9 / 16. For example, 1280 px wide gives 720 px tall.
Use the reducer card: enter the image's pixel width and height and the tool divides both by their greatest common divisor to give the simplest ratio. For instance, 1920x1080 reduces to 16:9 and 1024x768 reduces to 4:3.
16:9 is standard for HD video and most screens, 4:3 is used by older displays and classic photos, 1:1 is square (common on social media), 9:16 is vertical video for stories and Reels, and 21:9 is ultrawide cinematic.
If you scale width and height by different amounts, the image stretches or squashes and looks distorted. Calculating the matching dimension keeps the proportions identical so the result looks correct.