Aspect ratio calculator
Find the aspect ratio from width and height, work out the missing side from a ratio, resize proportionally and copy the CSS aspect-ratio.
Your data stays on your computer. Files are processed in your browser and are never uploaded.
Reduced ratio
16:9
As a decimal: 1.7778
It is exactly 16:9
Resize proportionally
1280 × 720 px
Even numbers and multiples of 8 are for video and codecs; with rounding the real ratio may differ slightly from the requested one.
CSS
aspect-ratio: 16 / 9;
Fallback for browsers without aspect-ratio
padding-top: 56.25%;
How to use it
- With “Find the ratio” enter width and height (for example 1920 and 1080): you get the reduced ratio, 16:9.
- To resize proportionally enter the new width: the height is worked out for you.
- With “Work out a side” pick a ratio (16:9, 4:3, A4…), enter the side you know and get the other.
- If needed, round to even numbers or multiples of 8; copy the CSS aspect-ratio ready to paste.
Frequently asked questions
What is an aspect ratio?
It is the ratio between the width and height of an image or screen, written like 16:9. You get it by dividing both sizes by their greatest common divisor.
What is the A4 (√2) ratio?
Sheets in the A series (A4, A3…) have a height equal to the width times the square root of 2 (about 1.4142): cutting a sheet in half gives a sheet with the same ratio.
Why round to multiples of 8 or even numbers?
Many video codecs require even sizes or multiples of 8 (or 16). Rounding changes the ratio slightly: the tool shows the difference.
How do I use aspect-ratio in CSS?
Add the property (for example aspect-ratio: 16 / 9) to an element with a defined width: the height follows the ratio. For very old browsers there is the fallback with a percentage padding-top.
Is my data sent to a server?
No: everything runs in your browser.