CSS Aspect Ratio Calculator

Reduce width and height to a CSS aspect-ratio declaration.

Try an example

Enter the positive whole-number width and height of the item.

1920, 1080

Expected output

aspect-ratio: 16 / 9;

Common questions

Will the result resize an image file?
No. The declaration controls a layout box’s preferred proportions. Use the image converter for actual pixel dimensions.
Why is 1920 by 1080 written as 16 by 9?
Both dimensions are divided by the same greatest common divisor, preserving the proportion.

The tool processes your input in this browser. It does not upload the input itself.