CSS Aspect Ratio Calculator
Compute CSS aspect-ratio from width and height (or vice versa). Includes the legacy padding-top hack for older browsers, and common ratio presets (16:9, 4:3, golden ratio, square).
How to use the CSS Aspect Ratio Calculator
Set width and height; the simplified ratio (e.g., 1920×1080 → 16:9) is computed. Output is both modern aspect-ratio and the padding-top fallback for IE11/very old browsers. Most projects can use just the modern property.