📐

Aspect Ratio Calculator

Calculate missing dimensions for any aspect ratio

✨ GeneratorsFreeRuns in your browser
:
1920 × 1080
Pixel size
16:9
Simplified ratio
1.7778
Width / height

CSS

aspect-ratio: 16 / 9;
WidthHeight
320px180px
640px360px
768px432px
1024px576px
1280px720px
1920px1080px

About the Aspect Ratio Calculator

The Aspect Ratio Calculator finds the missing dimension when you know one side and the ratio. It also simplifies a ratio, gives the CSS aspect-ratio value, and lists common scaled sizes.

Getting the height wrong is a common cause of layout shift and distorted images. Reserve the space with the correct ratio before the media loads, then let the image fill it.

  • ✓Width or height calculation
  • ✓Common ratio presets
  • ✓Copy-ready CSS aspect-ratio

How to use the Aspect Ratio Calculator

  1. 1

    Enter the aspect ratio, such as 16 by 9.

  2. 2

    Choose which dimension you know and enter its value.

  3. 3

    Copy the calculated size or the CSS rule.

Frequently asked questions

How do I get a ratio from two dimensions?+

Divide both numbers by their greatest common divisor. The tool does this for you and shows the simplified ratio next to the pixel size.

Does the CSS property need a fallback?+

Modern browsers support aspect-ratio. For very old browsers, use the padding-top percentage trick as a fallback in a supporting rule.

Save Aspect Ratio Calculator to your favorites, or keep browsing generators.

Browse all 45 generators →