Aspect Ratio Calculator
Given any two of width, height, or a ratio (e.g. 16:9), calculate the missing dimension.
Monitor this automatically
NetTests can run this check on a schedule, preserve historical results, compare changes over time, and alert you the moment something breaks.
Start monitoring free → See all monitoring productsFrequently Asked Questions
What is an aspect ratio?
An aspect ratio is the proportional relationship between a frame's width and height, expressed as W:H. Common ratios: 16:9 (widescreen HD video, most monitors), 4:3 (traditional TV, older monitors), 1:1 (square, Instagram posts), 9:16 (portrait video, smartphone screens). The ratio is simplified to its lowest terms — 1920×1080 simplifies to 16:9.
How do I calculate a proportional height from a width?
Enter the width and the target ratio. For a 16:9 container at 800px wide: height = 800 × (9/16) = 450px. This tool does this automatically — enter any two of width, height, or ratio and it calculates the third. Useful for maintaining consistent aspect ratios across responsive breakpoints in CSS or image cropping.
How do I maintain aspect ratio in CSS?
Modern CSS: aspect-ratio: 16 / 9; on the element. For older browsers, the padding-top trick: padding-top: 56.25% (which is 9/16 = 56.25%) on a container with position: relative. For images: object-fit: cover with explicit width/height maintains ratio while filling the container.