About this tool
An aspect ratio calculator (width to height ratio, 16:9 calculator, image ratio, screen ratio) reduces two pixel sizes to the smallest whole-number ratio and resizes while keeping the shape.
Enter the width and height in pixels, plus a new width if you want to scale. The ratio is width / gcd : height / gcd, where gcd is the greatest common divisor, and the new height = new width x height / width.
For example, 1920 x 1080 has a gcd of 120, so the ratio is 16:9, and its decimal ratio is 1.78; a new width of 1280 gives a height of 1280 x 1080 / 1920 = 720. Why is my ratio a strange number like 683:384?
The sizes you typed do not reduce neatly, so the exact ratio is large; use the decimal ratio to compare it with common shapes. Can I enter decimals?
Pixel sizes are rounded to whole numbers for the ratio, but the new height keeps decimals so you can round it yourself. Round the final height to a whole pixel before exporting.
For CSS font sizes see the px rem Converter, and for scaling amounts the Percent Calculator. Calculated in your browser; nothing is saved or sent.
How to use
- Enter the width and height in pixels.
- Read the simplified ratio and the decimal ratio.
- Type a new width to get the height that keeps the same shape, and round it to a whole pixel.