⚡
usefultools.dev
16:9

Aspect Ratio Calculator

NEW

Find the aspect ratio of any size, scale dimensions proportionally and get CSS aspect-ratio code.

Runs 100% in your browser — your input is never uploaded or stored on our servers.

1. Original size or ratio
Presets:
Aspect ratio
16:9
Decimal 1.7778 · Landscape · 2.07 MP
16:9 — HD, Full HD, 4K, YouTube
16:9
2. Scale to a new size (type either value)
Sizes at 16:9
WidthHeight
320 px180 px
480 px270 px
640 px360 px
800 px450 px
1024 px576 px
1280 px720 px
1600 px900 px
1920 px1080 px
2560 px1440 px
3840 px2160 px
CSS aspect-ratio
.box {
  aspect-ratio: 16 / 9;
  width: 100%;
}
padding-top fallback (older browsers)
.box {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 9 / 16 = 56.25% */
}

.box > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
⚡

Quick Examples

Typical inputs and the results this tool produces.

Ratio
1920 × 1080
16:9 (1.7778)
Ratio
1366 × 768
683:384, very close to 16:9
Ratio
1200 × 630
40:21 (1.9048)
Scale
4:3 at width 1280
Height 960 px
Scale
16:9 at height 720
Width 1280 px
📖

Overview

An aspect ratio is the proportional relationship between the width and the height of a rectangle, written as two numbers such as 16:9. It tells you the shape of a screen, video, photo or image without saying how many pixels it has. 1920×1080, 1280×720 and 3840×2160 all share the same 16:9 ratio.

This aspect ratio calculator reduces any width and height to the simplest ratio using the greatest common divisor, shows the decimal value and orientation, and names well-known ratios such as 16:9, 4:3, 21:9 or 9:16. Sizes that are almost a standard ratio, like 1366×768, are flagged as very close to it.

Then scale: type a new width to get the matching height, or a new height to get the width, with optional rounding to whole pixels. A table lists the height for common widths, and ready-to-paste CSS gives you the modern aspect-ratio property plus a padding-top fallback for older browsers. Everything runs in your browser.

Why use this tool?

  • Simplest ratio via GCD, with decimal and orientation
  • Recognises 16:9, 4:3, 21:9, 9:16 and other standards
  • Solve the missing width or height while keeping the ratio
  • CSS aspect-ratio and padding-top fallback code
  • Visual box that shows the shape
⭐

Features

➗

GCD simplification

Reduces any width and height, including decimals, to the smallest whole-number ratio.

🏷️

Common-name hints

Tells you when a ratio is a known format and when it is within about 0.4% of one.

↕️

Solve missing dimension

Enter a new width to get the height, or a new height to get the width.

📏

Size table

Heights for common widths from 320 to 3840 px at your ratio.

🧱

CSS output

aspect-ratio property plus a padding-top fallback for old browsers.

▭

Visual box

See the exact shape of your ratio at a glance.

🛠️

How to Use

1

Enter width and height

Type the original size, or click a preset such as 16:9 or 4:5.

2

Read the ratio

See the simplified ratio, decimal value, orientation and any common name.

3

Scale to a new size

Type a new width or a new height; the other value is calculated and rounded if you wish.

4

Copy the CSS

Copy the aspect-ratio snippet or the padding-top fallback into your stylesheet.

🤔

Frequently Asked Questions