Aspect Ratio Calculator
Aspect ratio calculator to simplify any width and height, resize while keeping proportions, compare 16:9, 4:3 or 21:9 sizes and copy the CSS aspect-ratio code.
Common ratios
- Simplified ratio
- –
- Decimal ratio
- –
- Orientation
- –
- Nearest standard
- –
Preview
Common ratios
| Ratio | Decimal | Size | Typical use |
|---|
How to use the aspect ratio calculator
- Pick one of the Common ratios (16:9, 4:3, 21:9, 1:1, 9:16, 3:2, 16:10, 4:5), or type your own values in Ratio or original size. You can enter a ratio (16 and 9) or the real dimensions of an image, video or screen (1920 and 1080).
- Read the results: the Simplified ratio, the Decimal ratio (width divided by height), the Orientation and the Nearest standard format. A “≈” sign means your size is close to, but not exactly, that standard.
- Under New size (keeps the ratio), type a New width to get the matching height, or a New height to get the width. The line below shows the calculation. Uncheck Round to whole pixels if you need the exact value, for example for print sizes in millimetres.
- Swap width and height turns a landscape ratio into portrait (16:9 becomes 9:16) and back.
- The Preview draws a box with your ratio, and the table lists the size of every common ratio at your new width.
- Copy the CSS code with Copy.
How the calculation works
An aspect ratio is the width divided by the height, written as two whole numbers. To simplify it, the tool divides both sides by their greatest common divisor (GCD): the GCD of 1920 and 1080 is 120, so 1920:1080 = 16:9. Decimal inputs are first multiplied by a power of ten (2.39:1 becomes 239:100).
To resize while keeping the proportions, it is a rule of three:
- new height = new width × original height ÷ original width
- new width = new height × original width ÷ original height
Example: a 16:9 video at 1280 px wide is 1280 × 9 ÷ 16 = 720 px high.
Some screens have “odd” ratios. A 1366 × 768 laptop simplifies to 683:384, which is 1.779:1, a hair away from 16:9 (1.778:1), hence “≈ 16:9”. Monitors sold as 21:9 are really 64:27 (2560 × 1080) or 43:18 (3440 × 1440), which is why both appear in the table.
The CSS aspect-ratio property
aspect-ratio: 16 / 9; tells the browser to compute the missing dimension: with width: 100%, the height follows automatically, and the box scales with its container. It works in every current browser (since 2021) and is ideal for video embeds, cards, image placeholders and thumbnails. Combine it with object-fit: cover on images to crop instead of stretching.
The code also includes the older padding-top technique as a fallback: a percentage padding is computed from the width, so padding-top: 56.25% (9 ÷ 16) reserves a 16:9 area, and the content is positioned absolutely inside it. You only need it for very old browsers.
Reserving the space with a ratio also prevents layout shifts while images and videos load, which improves the Cumulative Layout Shift (CLS) score.
Frequently asked questions
What is the aspect ratio of 1920 × 1080?
16:9. So are 1280 × 720, 2560 × 1440 and 3840 × 2160 (4K UHD).
What ratio should I use for vertical videos?
9:16 for stories, Reels, TikTok and Shorts (1080 × 1920). For feed posts, Instagram favours 4:5 (1080 × 1350).
Is 16:10 the same as 16:9?
No. 16:10 (1.6:1) is slightly taller than 16:9 (1.78:1). It is common on laptops, such as 1920 × 1200 or 2560 × 1600.
Why is my resized height not a whole number?
Because the width you chose is not a multiple of the ratio. 1000 px at 16:9 gives 562.5 px. Round to whole pixels rounds it to 563; choosing a width that is a multiple of 16 avoids rounding altogether.
Does resizing change the image quality?
This tool only calculates dimensions. Enlarging an image beyond its original pixels makes it softer; to actually resize a file, use an image resizer with these numbers.
Related tools
- PX to REM Converter Convert px to rem and em with any root font size, build a bulk conversion table and turn every px value of a CSS snippet into rem in one click.
- Image Resizer Resize JPG, PNG and WebP images by pixels or percentage, keep the aspect ratio and process several photos at once, right in your browser.
- Screen Resolution Checker Check your screen resolution, viewport size, device pixel ratio, physical pixels, colour depth and orientation instantly, with live updates as you resize.
- Ratio and Proportion Solver Solve a proportion A:B = C:D for any missing term by cross-multiplication, and simplify ratios like 12:18:24 or 1.5:2 to whole numbers, with steps.