Aspect Ratio Calculator

Enter a width and height to get the simplified ratio, or lock a ratio and solve for a missing dimension — with a live preview of the shape. Drop in an image to detect its ratio. Everything runs in your browser; your image never leaves your machine.

Aspect ratio = width : height, reduced to its smallest whole numbers. Divide both dimensions by their greatest common divisor (GCD). Example: 1920×1080 → GCD is 120 → 16:9 (decimal 1.78).
ratio = (W ÷ GCD) : (H ÷ GCD)  ·  missing height = W × (Hr ÷ Wr)
Round results to numbers divisible by: (video encoders often require even or mod-4 dimensions)
16:9
live preview — shape drawn to scale
Simplified ratio
Decimal (W÷H)
for CSS aspect-ratio, code
Orientation
Drop an image here (or click to choose) to detect its dimensions and ratio.
Read locally by your browser — your file never leaves your machine.
Embed this tool

Free to embed on any site. The credit link must stay.

All math and image reading happen in your browser. Nothing is uploaded or sent to any server — you can verify in your browser's network inspector.

[ Ad slot — replace with AdSense / Ezoic code ]

What is an aspect ratio, and how do you calculate it?

An aspect ratio describes the shape of a rectangle — how wide it is relative to how tall. To calculate it, divide the width and height by their greatest common divisor. 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9, so a 1920×1080 frame is 16:9. The decimal form (width ÷ height, so 1.78 for 16:9) is what CSS aspect-ratio, video encoders, and most code expect. Two images with the same ratio can be any size: 640×360, 1280×720, and 3840×2160 are all 16:9.

16:9 — the widescreen standard

16:9 is the shape of nearly every modern monitor, TV, and landscape video platform. Common 16:9 resolutions include 1280×720 (HD), 1920×1080 (Full HD), 2560×1440 (QHD), and 3840×2160 (4K UHD). To find the 16:9 height for any width, multiply the width by 9/16 — for a 1920-wide frame that's 1920 × 0.5625 = 1080. Use the 16:9 chip above with the ratio lock to solve either dimension instantly, or deep-link straight to it: ?ratio=16:9&w=1920.

9:16 — vertical video

Rotate 16:9 a quarter turn and you get 9:16, the portrait shape used by phone-first short video and story formats. The standard vertical frame is 1080×1920. Because the math is just the widescreen ratio flipped, the height is width × 16/9 — a 720-wide vertical video should be 1280 tall. The preview above draws portrait shapes taller than wide, so you can see at a glance whether your numbers describe the orientation you meant.

Check the aspect ratio of an image

To find the aspect ratio of an image you already have, you don't need to open it in an image editor and read the canvas size — drop it into the box above. Your browser reads the file's pixel dimensions locally, and the calculator fills in the width and height and shows the simplified ratio, the decimal, and the closest standard ratio. The file is never uploaded: the detection uses the browser's own image decoding on your machine, and works even with the network disconnected.

Resize without distortion (aspect ratio scaler)

Stretching an image to a different ratio squashes or elongates everything in it. To resize without distortion, keep the ratio locked: new height = new width × (original height ÷ original width). Enter your original size, tick Lock ratio, then type the new width — the matching height appears instantly. If the target box has a different ratio than the source, you must either crop (cut off part of the image) or letterbox (add bars); no amount of scaling maps one ratio onto another without distortion.

Common screen ratios and resolutions chart

Every row is computed from the ratio math on this page — click a row to load it into the calculator.

ResolutionRatioDecimalTypical use

Embed this calculator on your site

Design blogs, course pages, and internal wikis can embed this calculator free of charge. Open Embed this tool at the bottom of the calculator, copy the iframe snippet, and keep the credit link that ships with it. The embedded view is the tool only — no navigation, no analytics, no cookie banner.

[ Ad slot — replace with AdSense / Ezoic code ]

Frequently asked questions

How do I calculate an aspect ratio by hand?

Find the greatest common divisor of the width and height, then divide both by it. For 1440×900: the GCD is 180, so the ratio is 8:5 (usually written 16:10). If the GCD is awkward to spot, divide width by height and compare the decimal to known ratios — 1.6 is 16:10, 1.78 is 16:9, 1.33 is 4:3.

What is the 16:9 size for a 1920 width?

1920 × 9 ÷ 16 = 1080, so the frame is 1920×1080 — Full HD. The same formula gives 720 for a 1280 width and 2160 for a 3840 width.

What's the difference between portrait and landscape?

Landscape means the width is larger than the height (16:9, 4:3, 3:2). Portrait means the height is larger (9:16, 3:4, 2:3). A square 1:1 frame is neither. The ratio itself flips when you rotate: a 4:3 photo turned on its side is 3:4. This calculator labels the orientation automatically from whichever numbers you enter.

Does changing the aspect ratio crop or stretch my image?

It depends on the operation, not the ratio. Scaling both dimensions by the same factor keeps the ratio and distorts nothing. Scaling them by different factors changes the ratio by stretching. Cropping changes the ratio by discarding pixels instead. If you need a 16:9 image from a 4:3 source, cropping the top/bottom keeps subjects natural; stretching makes everything look wider. Use the lock-ratio solver above to compute crop dimensions that fit your target ratio.

Is the image I drop in uploaded anywhere?

No. The browser decodes the image on your device to read its width and height; there is no upload, no server, and no network request involved. You can disconnect from the internet after the page loads and the image detection still works.

[ Ad slot — replace with AdSense / Ezoic code ]

Related tools

⚒ Built by Done In Browseruse full version