PRINT & MEDIA CALCULATOR

Image Aspect Ratio Calculator

Compare fitting an entire image inside a frame with filling the frame and cropping the excess. Calculate dimensions before changing the file in an editor.

Calculator

px
px
px
px
YOUR RESULTS
Source aspect ratio4:3
Resized image width
1,440 px
Resized image height
1,080 px
Border or crop at each side
240 px
Border or crop at top and bottom
0 px
Frame treatment
Add borders to reach the target frame

Understanding your result

Fit mode reports the borders needed around the resized image. Fill mode reports how much of the resized image is cropped from each side. The source ratio is reduced to its smallest whole-number pair.

The formula

Fit scale = min(target width/source width, target height/source height). Fill scale = max of those two ratios.

Multiply each source dimension by the selected scale. Fit dimensions round down to stay inside the frame; fill dimensions round up to cover it. Half the difference on each axis gives a centred border or crop. One-pixel minimums prevent an unusable zero-sized dimension.

Worked example

A 4,000 by 3,000 image has a 4:3 ratio. Inside a 1,920 by 1,080 frame, fit mode gives 1,440 by 1,080 with 240-pixel borders on each side. Fill mode gives 1,920 by 1,440 and crops 180 pixels from the top and bottom.

How to use this calculator

  1. Enter the original width and height in pixels.
  2. Enter the final frame dimensions in the same orientation.
  3. Choose whether preserving all content or covering the frame is more important.

Use crop amounts after resizing

The reported crop is measured on the resized image, not on the original pixel grid. Set the resize dimensions first, then crop to the target frame. The calculation assumes a centred subject; portraits or off-centre compositions may need the crop shifted manually.

Integer pixels and proportional scaling

Most digital exports use whole pixels. Rounding can change the exact aspect ratio slightly, especially for very small outputs or extreme shapes. A half-pixel border result means the extra pixel must go on one side when constructing a raster canvas. Increasing dimensions enlarges the image but does not establish that enough source detail exists for the intended use.

Assumptions & limitations

What this calculation assumes

  • Square pixels, no rotation, and a centred frame treatment.

What to keep in mind

  • Computes dimensions only; it does not crop or resize an uploaded image.

Common questions

Which mode avoids cutting off the subject?

Fit keeps the full image and may leave borders. Fill removes excess content whenever source and target ratios differ.

Why are two borders sometimes unequal in an editor?

An odd total difference cannot be divided into two equal whole-pixel borders. Put the remaining pixel on either side.

Sources & further reading