Skip to content

Image Dimension Calculator

Set the new

Resized dimensions

960 × 540 px


Aspect ratio
16:9
Scale factor
0.5×
Original
1,920 × 1,080 px

Estimates for educational purposes — not financial, medical, or legal advice. See terms.

Resizing an image while keeping it from looking stretched is the single most common image-math problem in web and print design. Enter the original width and height plus the new target for one of the two dimensions, and this tool tells you what the other dimension has to be so the resized image preserves the original aspect ratio.

The math is trivial — it is literally one multiplication — but doing it in your head while you are also composing a layout is a distraction, and doing it on a calculator app requires switching away from whatever tool you are actually designing in. This tool gives you the answer immediately, with the scale factor and the simplified aspect ratio as bonus information.

The formula

If the original image is $W_0$ wide and $H_0$ tall, and you want the resized image to be $W_1$ wide, the new height is:

H1=W1H0W0H_1 = W_1 \cdot \frac{H_0}{W_0}

Symmetrically, if you are setting the new height:

W1=H1W0H0W_1 = H_1 \cdot \frac{W_0}{H_0}

Both formulas preserve the ratio $W/H$, which is what “preserving the aspect ratio” means: the shape of the rectangle stays the same, only its absolute size changes.

Example: scaling a 4K photo down to fit a blog post

A modern smartphone camera produces images around 4032 by 3024 pixels — the native resolution of a 4:3 sensor, around 12 megapixels. If your blog’s content column is 1280 pixels wide and you want the photo to fill it without distortion, enter the original dimensions and set the target width to 1280. The calculator returns a height of 960 pixels and a scale factor of ≈ 0.317 (the output is about 32% of the original on each axis, so about 10% of the total pixel count). Round 960 to the nearest whole pixel — it happens to already be whole — and that is the size you export to.

Example: designing a 16:9 hero banner

You want a hero banner at a known width but you are working with an abstract 16:9 aspect ratio, not a specific source photo. Enter 16 and 9 as the originals, set the target width, and read off the target height. Want a 1440 px wide banner? 1440 × 9 / 16 = 810 px. Want 1920? 1080. The tool does not care what units you put in the “original” boxes — any pair with the right ratio works. For the symmetric “I know two dimensions and one target, solve any of the four” case, the aspect ratio calculator is the more general version.

Example: solving for width when you know the height

Design systems often specify image heights because they must fit inside a fixed row. If a card grid has a 200 px tall image slot and your source photo is 4032 by 3024, set the target height to 200 and read off the width: 266.67 px (rounding to 267). That is the width you need to render at, and the scale factor is about 0.066 — aggressively scaled down, which is fine for display on a webpage.

Scale factor and rounding

The scale factor (target / original on either axis) is the single number that tells you how much smaller or larger the output is relative to the input. Values below 1 are downscaling and are generally safe; values above 1 are upscaling and reveal pixelation or compression artifacts from the original. If you see a scale factor above about 2, consider starting from a higher-resolution source.

The computed dimensions often come out fractional — a target width of 1000 from a 1920×1080 source gives a height of 562.5. When you actually export the image you need to round to whole pixels, and the rounding error is at most half a pixel, which is invisible in practice. The tool shows both the precise and rounded values so you can pick.

What this tool does not do

It does not resize an actual image file — it is pure math, not pixel manipulation. For resizing real files, use an image editor, ImageMagick on the command line, or a canvas-based tool in the browser. For sizing the same image at a specific print DPI, the DPI calculator connects pixels, physical size, and resolution. It also does not handle cropping or letterboxing; if you need a specific width AND height that don’t match the aspect ratio of the source, you need to pick one axis to preserve and accept that the other will need to be cropped or padded.

Frequently asked questions

Why can't I just stretch an image to any size?

You can, but the result is distorted — faces look compressed or stretched, straight lines become angled, and text gets harder to read. Preserving the aspect ratio means one axis is computed from the other so the image keeps its original proportions. If you absolutely need a specific width AND height, the right move is to resize to the closest matching aspect ratio first and then crop.

What does scale factor mean?

Scale factor is the ratio of the new size to the original. A scale factor of 0.5 means the output is half the size of the original on each axis — so a quarter of the total pixels. A scale factor of 2 means it's twice as large on each axis and four times the total pixels. Values above 1 are scaling up and generally lose quality; values below 1 are scaling down and are usually safe.

Why is the output sometimes a fractional number of pixels?

Because not every target dimension divides cleanly. If your original is 1920 by 1080 and you ask for a target width of 1000, the computed height is 562.5 — which no image can actually have. Round to the nearest whole pixel when you apply the value, and the distortion from rounding will be invisible. The tool shows the unrounded value so you can see the precise ratio and decide for yourself.

Can I compute the other dimension if I only have the aspect ratio?

Yes — if you know you want a 16 by 9 result at width 1280, enter 16 and 9 as the original dimensions. The aspect ratio is what matters for the computation, not the absolute numbers. Your 'original' can be any pair of values that share the target ratio. This is how you design a layout around a target aspect ratio rather than a specific photo.

Will this resize an actual image file?

No. This tool only computes the numbers. To actually resize the pixels you need an image editor, a command-line tool like ImageMagick, or a browser canvas. The math it gives you is the same math those tools use internally — you're just getting the target dimensions without running the operation.