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:
Symmetrically, if you are setting the new height:
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.