Aspect Ratio Calculator

Simplify image and video dimensions to an exact aspect ratio, generate CSS aspect-ratio and calculate a proportional height.

How to use

The greatest common divisor reduces integer dimensions to an exact ratio: 1920 × 1080 becomes 16:9, while 1080 × 1920 becomes 9:16. The result also includes an aspect-ratio CSS declaration.

Enter an optional new width to calculate height = new width × original height / original width. The calculated height is rounded to three decimal places; image editors may require rounding again to a whole pixel.

Behavior and limits

This calculator does not resize, crop or upload an image. It works from dimensions only. Use positive integer dimensions up to one billion; zero and fractional source sizes are rejected.

Questions & answers

Why is a near-16:9 size not shown as 16:9?

The tool reports the exact ratio instead of snapping to a named preset. Cropped or rounded dimensions can have a different exact ratio.

Is my input uploaded?

No. Processing runs in your browser. This tool does not send your input to an API or save it in local storage. Text tools accept up to 200,000 characters.

Other Languages