Skip to content
๐Ÿ“

Aspect Ratio Calculator

Work out width, height and scale from any aspect ratio.

Runs in your browser

Updated

Presets:

Calculated

Decimal ratio
Height for width
Width for height
Simplified

Fits inside a container

x
Largest fit (contain)
Scale factor
Smallest fill (cover)

Three boxes and a blue rectangle

Ratio, Width and Height are the only inputs, opening at 16:9, 1920 and 1080, with a container pair below defaulting to 1200 by 1200. The ratio field accepts a colon, a slash or a space between two numbers, and both must exceed zero. Each keystroke refreshes four calculated lines, the fit block, and a preview rectangle scaled to fit 240 pixels of height within the column.

A worked example

On the shipped values, Decimal ratio prints 1.7778, Height for width computes 1920 ร— 9 รท 16 and rounds to 1080 px, Width for height returns 1920 px, and Simplified divides both terms by their greatest common divisor, which is 1, leaving 16:9. Against the 1200 ร— 1200 container the contain factor is the smaller of 1200/1920 and 1200/1080, namely 0.625, so Largest fit reads 1200 x 675 px and Scale factor reads 0.625x. Smallest fill takes the larger factor and reads 2133 x 1200 px.

Presets and reduction

Six buttons rewrite only the ratio field: 16:9, 9:16, 4:3, 3:2, 1:1 and 21:9. Width, Height and the preview stay where they were, so pressing 21:9 moves the calculated height to 823 px while the fit lines do not stir. Typing 1920:1080 reduces to 16:9, because the Euclidean divisor of those terms is 120.

Where it stops

  • Each ratio term is rounded before reduction, so 2.35:1 shows a decimal of 2.3500 but a Simplified value of 2:1.
  • A lone number is rejected, even though the error text offers 1.78 as an example.
  • Fit and cover are measured from the Width and Height boxes, not the ratio, so they can disagree with the preset just pressed.
  • Pixels only, with no percentage, print size or megapixel view.

Questions people ask

Which number is the true ratio of my photo?

Enter its pixel dimensions as Width and Height, then type them into the ratio field as width:height and read Simplified.

Now what?

Take the Largest fit line to the image resizer, or cut the frame first with the crop tool.