Aspect Ratio Calculator

Calculate width and height from any aspect ratio — enter any ratio and get the matching dimensions, the CSS aspect-ratio property, legacy padding-top hack, and a list of common screen sizes for that ratio.

Common Ratios
Aspect Ratio
: = 1.778
Calculate Dimensions
Width px
Height px
16 : 9
1920 × 1080 px
Common Dimensions at this Ratio

About CSS aspect-ratio

The CSS aspect-ratio property (e.g. aspect-ratio: 16 / 9) locks an element's width-to-height relationship so it scales proportionally without JavaScript. Before this property was widely supported, the "padding-top hack" was used — setting padding-top to a percentage of the width (e.g. 56.25% for 16:9) because padding percentages are always relative to the parent width, not height. aspect-ratio is now supported in all modern browsers and replaces the padding hack entirely. It works on any element, including replaced elements like img and video, and prevents layout shift while media loads.

Related Tools

CSS Units Converter Convert between px, rem, em, vw, vh, pt, cm and more. Set base font si CSS Clamp() Calculator Fluid clamp() values for typography and spacing — min/max/viewport CSS Grid Generator Grid layouts with template areas — drag cells, copy CSS CSS Media Query Builder Build responsive media queries — min/max-width, orientation, prefers-c