Generators & utilities

Image dimension calculator

Work out the matching height for a given width, the print size at 300 DPI, or the scale factor between two sizes, without uploading anything.

  • Runs in your browser
  • Nothing is uploaded
  • No sign-up
  • No watermark

Optional: drop an image to read its dimensions

or tap to browse · you can also paste from the clipboard

JPG · PNG · WebP · GIF · BMP · AVIF · SVG  ·  up to 50 MB each

Choose an image

How to use the image dimension calculator

Enter your original width and height, then the one measurement you know: a target width, height, percentage, or a box the image must fit inside. The matching dimension, aspect ratio, megapixels, print size at any DPI and a rough file size estimate are calculated instantly, and nothing is uploaded.

  1. Enter the original sizeType width and height, or drop in an image to read them automatically.
  2. Choose what you knowTarget width, target height, a percentage, or a box the image must fit inside.
  3. Read the resultsNew dimensions, aspect ratio, megapixels, print size and an estimated file size.

About this tool

Aspect-ratio arithmetic is easy to get wrong under time pressure, and a stretched image is instantly obvious to everyone but the person who made it. Enter the original dimensions and the one measurement you know; the rest is calculated for you.

You can also load an image to fill in the original dimensions automatically. The file is only measured, never processed or transmitted.

What you get

  • Aspect-ratio-locked width and height calculation
  • Fit-inside-a-box mode for thumbnails and containers
  • Simplified ratio detection (16:9, 4:3, 3:2 …)
  • Print size in inches and centimetres at any DPI
  • Rough JPEG file size estimate

When to use the image dimension calculator

Working out the matching height

You know the image must be 1200 px wide; the calculator gives the height that keeps the proportions intact.

Planning a print

Divide pixels by DPI to see the physical size. 3000 × 2400 px at 300 DPI prints at exactly 10 × 8 inches.

Fitting a container

Fit-in-box mode gives the largest size that fits inside a bounding box without distortion, using the same maths as CSS object-fit: contain.

Identifying an aspect ratio

Enter any two dimensions to see the simplified ratio, so you can tell 16:9 from 16:10 at a glance.

How it works

Aspect ratio is simply width divided by height, and preserving it means scaling both dimensions by the same factor. The calculator reduces the ratio using the greatest common divisor, so 1920 × 1080 displays as 16:9. Ratios that do not simplify neatly (common with cropped images) are shown as a decimal such as 1.618 : 1 rather than an unhelpfully large fraction.

DPI is where most confusion lives. A digital image has no inherent physical size; it has a pixel count. DPI is metadata that tells a printer how densely to place those pixels. Changing the DPI field in a file's metadata does not add or remove a single pixel. It only changes how large the print comes out. The formula is simply pixels ÷ DPI = inches.

The file size estimate assumes roughly 0.28 bytes per pixel, typical for a quality-80 JPEG photograph. Treat it as an order-of-magnitude guide only: flat graphics and screenshots come out far smaller, noisy or highly detailed photographs larger. For a real number, run the image through the Image Compressor.

Common problems and how to fix them

The calculated height is not a whole number
It is rounded to the nearest pixel, which can leave the ratio a fraction of a percent off. That is invisible in practice. You cannot display a fractional pixel.
My ratio shows as a decimal instead of something like 16:9
The dimensions do not reduce to small whole numbers, which usually means the image has been cropped. The decimal form is the accurate answer.
The file size estimate was wrong
It is a rough guide based on typical photographic content. Use the Image Compressor for a real measurement of your actual file.
I do not know my original dimensions
Drop the image onto the page and they are filled in automatically. The file is only measured; nothing is processed or transmitted.

Frequently asked questions

What aspect ratio is my image?

The calculator reduces width:height by their greatest common divisor. Ratios that do not simplify neatly are shown as a decimal, for example 1.618 : 1.

How do I calculate print size from pixels?

Divide pixel dimensions by the print resolution. 3000 × 2400 px at 300 DPI prints at 10 × 8 inches (25.4 × 20.3 cm), and the calculator shows both units. At 150 DPI the same file prints at 20 × 16 inches, with visibly less detail.

What DPI do I need for printing?

300 DPI is the standard for photo prints and press work. 150 DPI is acceptable for large posters viewed from a distance, and 72-96 DPI is a screen-era convention that means nothing for print quality.

How accurate is the file size estimate?

It is a rough guide based on about 0.28 bytes per pixel, typical for a quality-80 JPEG photograph. Flat graphics come out far smaller, and noisy or highly detailed photos larger. Use the Image Compressor for a real number.

How do I calculate image dimensions while keeping the aspect ratio?

New height = original height × (new width ÷ original width). Enter your target width above and the calculator does it for you.

Does changing DPI change image quality?

No. DPI is metadata describing intended print density. It does not add or remove pixels, and it has no effect on how the image looks on a screen or on its file size.

What is the difference between DPI and PPI?

PPI (pixels per inch) describes a digital image or display; DPI (dots per inch) describes a printer's ink dots. In everyday image work the two terms are used interchangeably.

You may also like

Browse all 89 image tools

Ready when you are

Free, private, and done on your own device.

Add your image