UTILS.
Private by default
⊞

Aspect Ratio Calculator

Simplify a width:height ratio and scale dimensions while keeping the ratio.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
—

Scale to a new width or height — the other value keeps the ratio.

About this tool

Aspect Ratio Calculator reduces a width and height to their simplest ratio and then lets you scale that shape to a new size. Enter the original width and height (1920 by 1080 is pre-filled) and the ratio box shows 16 : 9; click the box to copy it.

Below it, type either a new width to get the matching height or a new height to get the matching width. The scaled value is rounded to four decimal places, so 2560 wide gives 1440 high, while an awkward ratio may give a long decimal that you will need to round to whole pixels yourself. Decimal inputs are supported: the numbers are scaled up by a power of ten (up to six decimal places) and divided by their greatest common divisor, so 1.5 by 1 becomes 3 : 2.

Both width and height must be numbers greater than zero; otherwise the ratio box shows an invalid message and nothing is scaled. The tool works with any unit, because only the proportion matters. Useful for sizing video, images, embeds and CSS aspect-ratio values. It runs in your browser and nothing is uploaded.

Frequently asked questions

How is the ratio simplified?
Both numbers are divided by their greatest common divisor, so 1920 by 1080 becomes 16 : 9. Decimal values are first scaled to whole numbers, up to six decimal places.
How do I resize while keeping the ratio?
Type the width you want in the new width box and the matching height is filled in, or type a height to get the width. The result is rounded to four decimals, so round to whole pixels if you need them.
Does the ratio have to be a standard one?
No. Any positive width and height work, and an odd shape such as 1000 by 630 simply reduces to 100 : 63.
Why does it say invalid?
The width and height must be numbers greater than zero. An empty field, zero, a negative value or text cannot define a ratio.

More tools