BiznTools
Tools

Image Tools

Aspect Ratio Calculator

Find the ratio, solve a missing side, or see how an image or video fits inside a new frame.

Go to calculator
Created by BiznToolsFounder: Syed TalhaMethod checked
What do you want to calculate?
Enter dimensions

Use whole numbers from 1 to 100,000. Enter dimensions in pixels.

Result

Enter the source width and height in pixels.

On this page
No sign-up Private calculationsHow it’s calculated

The method

How aspect ratio and frame sizing work

Aspect ratio compares width with height. Divide both numbers by their greatest common divisor to describe the shape in its simplest terms. For a different frame, Fit uses the smaller scale so the whole source stays visible. Cover uses the larger scale to fill the frame and crops the outer edges around the center.

Missing heightKnown width × ratio height ÷ ratio width
Missing widthKnown height × ratio width ÷ ratio height
Fit or coverCompare frame width ÷ source width with frame height ÷ source height

Example 1

Choose dimensions for a 16:9 player

A 1,920 × 1,080 frame reduces to 16:9. At a width of 1,080 pixels, its proportional height is 607.5 pixels. The nearest whole height is 608. If both dimensions must preserve exactly 16:9, choose a width that is a multiple of 16, such as 1,072 × 603.

Aspect ratio
16:9
Exact height
607.5 px
Whole-pixel height
608 px

Example 2

Put a wide image into a square frame

A 1,600 × 800 image has a 2:1 ratio. To fit a 600 × 600 square, scale it to 600 × 300, leaving 150 pixels above and below. To cover the square, scale it to 1,200 × 600 and cut 300 pixels from each side. Centering keeps the middle of the image in view.

Target frame
600 × 600 px
Fit
600 × 300 px
Cover before cropping
1,200 × 600 px

Before you calculate

Assumptions & limits

  • Enter whole pixel dimensions and ratio parts from 1 to 100,000. The calculations assume square pixels.
  • For the missing side, half pixels round up and tiny results suggest at least one pixel. Exact geometry stays available beside the rounded result.
  • Fit and cover show centered geometric sizes before rounding. An editor can use different rounding or crop alignment.
  • Numbers stay in this tab. Use these dimensions in your editor to work with the actual file.

Keep in mind

Common mix-ups

The same ratio can have different dimensions

1,920 × 1,080 and 1,280 × 720 are both 16:9. The ratio describes the shape. The dimensions describe the number of pixels in the frame.

Cover can cut off important details

The preview shows a centered crop. If a title or face sits near the edge, inspect the actual image and adjust the crop position in your editor.

Sources & calculation notes

W3C CSS Images Module Level 3

Defines how the contain and cover constraints preserve an image’s proportions when sizing it to a rectangle.

Method and input rules checked: . Engineering validation; no professional specialist review is claimed.