Aspect Ratio Calculator
Calculate missing dimensions for any aspect ratio
CSS
aspect-ratio: 16 / 9;| Width | Height |
|---|---|
| 320px | 180px |
| 640px | 360px |
| 768px | 432px |
| 1024px | 576px |
| 1280px | 720px |
| 1920px | 1080px |
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
Enter the aspect ratio, such as 16 by 9.
- 2
Choose which dimension you know and enter its value.
- 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 →