Free image calculator

Image Aspect Ratio Calculator

Simplify any width and height, calculate matching dimensions, and see how an image will Fit, Fill, crop or stretch inside a target frame.

No account. No upload. Calculations stay in your browser.

Calculate an aspect ratio

Enter dimensions or read them from an image.

Original dimensions

×

Aspect ratio results

LandscapeDecimal: 1.7778

Common aspect ratios

How to calculate an image aspect ratio

1

Enter the original dimensions

Type the width and height in pixels, or choose an image to read its dimensions automatically.

2

Read the simplified ratio

The calculator reduces both dimensions to their smallest practical width-to-height relationship.

3

Calculate a new size

Keep the ratio locked and enter a new width or height. The matching dimension updates immediately.

4

Check the fitting result

Compare Fit, Fill and Stretch before resizing or placing the image in a frame.

5

Copy what you need

Copy the ratio, calculated dimensions or CSS aspect-ratio declaration.

Common image aspect ratios

The right ratio depends on the destination. These ratios describe shape only. The actual pixel dimensions determine resolution and available detail.

1:1

Square

Profile images, product tiles and balanced grid layouts.

4:3

Classic landscape

Digital cameras, presentations and traditional screens.

3:2

Photography

Common still camera and print photo proportions.

16:9

Widescreen

Video, displays, presentations and landscape thumbnails.

9:16

Vertical

Phone screens, Stories, Shorts and vertical video.

4:5

Portrait post

Portrait social posts and product photography.

2:3

Tall photograph

Portrait photography, posters and print layouts.

21:9

Ultrawide

Cinematic banners, monitors and wide hero graphics.

Fit, Fill, Crop and Stretch explained

Fit or Contain

The complete image remains visible and keeps its proportions. If the frame has another ratio, unused space appears along two sides. This is the safest option when nothing can be cropped.

Fill or Cover

The image fills the complete frame and keeps its proportions. Parts extending beyond the frame are cropped. Reposition the crop when the subject is not centered.

Stretch

The image is forced into the exact width and height. A ratio change makes subjects appear wider or taller, so stretching is usually unsuitable for photographs and logos.

These definitions follow the browser sizing behavior described by the CSS object-fit standard. Use the calculator estimates to choose a method, then use the image resizer or crop tool to create the final image.

How the calculation works

For whole pixel dimensions, the calculator finds the greatest common divisor and divides both values by it. For example, 1920 and 1080 share a divisor of 120, producing 16:9.

To calculate a matching height, divide the new width by the original width-to-height value. To calculate a matching width, multiply the new height by that value. Pixel results are rounded to the nearest whole pixel.

Aspect ratio and resolution are different

Aspect ratio describes the frame shape. Resolution describes the number of pixels. A 640 × 360 thumbnail and a 3840 × 2160 display both have a 16:9 ratio, but the larger image holds far more detail.

Increasing pixel dimensions cannot restore detail that was missing from a small source. For the cleanest result, begin with an image at least as large as the required output.

Using aspect ratios on websites

CSS aspect-ratio

The CSS aspect-ratio property gives an element a preferred width-to-height relationship. It is especially useful for reserving responsive space before an image or video loads.

aspect-ratio: 16 / 9;

Responsive image fitting

Use object-fit: cover when the visual must fill its frame and cropping is acceptable. Use object-fit: contain when every part must stay visible.

object-fit: cover;

Frequently asked questions

What is an aspect ratio?+

An aspect ratio describes the proportional relationship between width and height. A 1920 by 1080 image simplifies to 16:9 because both dimensions divide by 120.

How do I calculate a missing width or height?+

Enter the original width and height, keep the ratio lock enabled, and type either new dimension. The calculator updates the other dimension using the same proportion.

Does aspect ratio include the image size in pixels?+

The ratio describes shape rather than total resolution. Images measuring 1920 by 1080 and 1280 by 720 both use 16:9, but they contain different numbers of pixels.

What is the difference between Fit and Fill?+

Fit keeps the whole image visible and may add empty space. Fill covers the complete target frame while preserving the ratio, so it may crop the edges.

Will changing an aspect ratio distort an image?+

It can. Stretching to a different ratio changes the proportions. Fit avoids distortion with empty space, while Fill avoids distortion by cropping excess areas.

Can I check an image aspect ratio automatically?+

Yes. Choose a PNG, JPG, WebP, AVIF, GIF or BMP. The browser reads its natural dimensions and calculates the simplified ratio locally.

Are uploaded images sent to a server?+

No. Image dimension reading and every calculation happen in your browser. The selected image is not uploaded to IMG Tweak.

What aspect ratio should I use?+

Use the ratio required by the website, social platform, display or print layout. When no specification exists, preserve the image's original ratio to avoid cropping or distortion.

Calculate your image ratio

Enter dimensions or choose an image to get its simplified ratio and matching sizes.