⚡ Design & CSS · Client-side · No data sent to server

Aspect Ratio Calculator

Set an original width and height to lock a ratio, then fill a new width or height to get the matching dimension. See the simplified ratio and pick from common presets. Everything runs in your browser.

Original size
×
Presets
16 : 9
1.7778 decimal
New size (fill one, get the other)
×
100% private. All math runs in your browser with plain JavaScript. No dimensions are uploaded or logged.

About the Aspect Ratio Calculator

The Aspect Ratio Calculator finds the ratio between a width and a height, reduces it to its simplest form (for example 16:9), and scales an image or video to a new size while keeping that ratio. It is built for web designers, developers, video editors, and anyone resizing media for screens, social posts, or layouts. All math runs in your browser, so nothing is uploaded.

How it works

  1. Enter an original width and height, or click a preset such as 16:9 or 4:3 to set the ratio.
  2. Read the simplified ratio and its decimal value below the inputs.
  3. Type a new width or a new height; the other value fills in automatically to keep the same ratio.
  4. Click Reset to clear all fields and start again.

Features

  • Simplified ratio using a greatest-common-divisor reduction, shown next to the decimal value.
  • Scale to a new size by filling either the width or the height to get the matching dimension.
  • Common presets: 16:9, 4:3, 1:1, 21:9, and 3:2.
  • Live updates as you type, with no button to press.
  • Runs fully client-side, so your numbers stay on your device.

Frequently asked questions

How is the simplified ratio worked out?

The tool divides both the width and the height by their greatest common divisor. For example 1920 by 1080 reduces to 16:9, because 120 divides into both values evenly.

I filled in a new width. Where does the new height come from?

It is calculated from the original ratio. The new height equals the new width multiplied by the original height and divided by the original width, rounded to a whole pixel.

Why is the new dimension rounded?

Pixels are whole units, so the computed value is rounded to the nearest pixel. For most ratios this is exact; for some it can be off by one pixel, which is normal.

Can I use decimal inputs?

Yes. You can type decimal widths and heights. The decimal ratio reflects your exact values, while the simplified ratio is based on the rounded whole numbers.

Is my data sent anywhere?

No. Every calculation happens in your browser with plain JavaScript. No dimensions are uploaded or logged.