Aspect ratio calculator
Solve a missing width or height from an aspect ratio, or simplify any width×height into its smallest ratio.
About this aspect ratio calculator
Lock an aspect ratio and the calculator keeps width and height in proportion: change one and the other follows. Or work the other way — enter any width and height and it reduces them to the smallest whole-number ratio.
How it works
Solving a dimension is simple proportion: height = width × ratioH ÷ ratioW (and the reverse for width). Simplifying a size divides both numbers by their greatest common divisor. Presets cover the common ones — 16:9, 4:3, 1:1, 3:2 and 21:9.
When to use it
Resize images and video without distortion, plan responsive media boxes, or grab
a copy-paste aspect-ratio rule for a container. For drawing proportional boxes
in pure CSS, see the aspect-ratio box snippet.
FAQ
How do I find the height for a given width?
Set the aspect ratio (or pick a preset like 16:9), type your width, and the height updates automatically to keep that ratio. Editing the height solves the width the same way.
How is the ratio simplified?
The tool divides both dimensions by their greatest common divisor, so 1920×1080 becomes 16:9 and 1280×1024 becomes 5:4.
Can I get the CSS for it?
Yes — it outputs a ready aspect-ratio declaration (for example aspect-ratio 16 / 9) you can copy straight into your stylesheet.