How to Resize an Image Without Distortion: Aspect Ratio Math
An image stretches when you change its width and height by different amounts. To resize an image without distortion, scale both sides by the same factor. Pick the new width, then calculate the height with new height = new width × original height ÷ original width. If you need a different shape, such as a square, you have to crop the image or add bars. Resizing alone can't change the shape without stretching.
The rest of this guide covers the math, with worked examples and correct pixel sizes for the common ratios. It also shows what you lose with cropping, letterboxing, and stretching, and what the resampling options in an image editor actually do.
What aspect ratio means and how to find yours
Aspect ratio is the relationship between an image's width and its height. It's written as width:height. A 1920 × 1080 image and a 1280 × 720 image have different sizes but the same 16:9 ratio, so they're the same shape.
To find the ratio, divide both dimensions by their greatest common divisor (the largest number that divides both evenly):
| Image size | Greatest common divisor | Simplified ratio | Width ÷ height |
|---|---|---|---|
| 1920 × 1080 | 120 | 16:9 | 1.778 |
| 4032 × 3024 | 1008 | 4:3 | 1.333 |
| 6000 × 4000 | 2000 | 3:2 | 1.5 |
| 1080 × 1350 | 270 | 4:5 | 0.8 |
| 1366 × 768 | 2 | 683:384 | 1.779 |
The decimal column is often more useful than the ratio. Two images are the same shape when width ÷ height gives the same number. The last row shows why. A 1366 × 768 screen is commonly sold as 16:9, but it reduces to 683:384. Its decimal, 1.779, is very close to 16:9's 1.778. A true 16:9 width at 768 pixels tall would be 768 × 16 ÷ 9 = 1365.33, which isn't a whole number, so the width ends up rounded to 1366.
Aspect ratio is a property of the pixel grid, not of print size or DPI. If you're preparing an image for print, the separate question of pixels per inch is covered in DPI vs PPI explained.
The formula to resize an image without distortion
Proportional resizing means multiplying the width and the height by the same scale factor. You usually know one target dimension, so solve for the other:
- New height = new width × original height ÷ original width
- New width = new height × original width ÷ original height
Worked example 1: a camera photo for a web page
Say you have a 4000 × 3000 photo and your page layout needs it 1200 pixels wide.
- Write down the original size: width 4000, height 3000.
- Multiply the new width by the original height: 1200 × 3000 = 3,600,000.
- Divide by the original width: 3,600,000 ÷ 4000 = 900.
- The new size is 1200 × 900. Check it: 1200 ÷ 900 = 1.333, the same as 4000 ÷ 3000.
Worked example 2: fitting a fixed height
A 1920 × 1080 screenshot has to fit a slot 720 pixels tall.
- New width = 720 × 1920 ÷ 1080 = 1,382,400 ÷ 1080 = 1280
- Result: 1280 × 720, still 16:9.
Worked example 3: when the answer isn't a whole number
A 4032 × 3024 photo turned to portrait is 3024 × 4032. Resize it to 1000 pixels wide:
- New height = 1000 × 4032 ÷ 3024 = 4,032,000 ÷ 3024 = 1333.33
- Round to 1000 × 1333.
Pixels have to be whole numbers, so rounding is normal. Being off by less than one pixel is invisible. Some video tools need even dimensions, so if you're making video frames, round to the nearest even number.
The percentage shortcut
Scaling by a percentage keeps the ratio automatically, because the same factor applies to both sides. At 50%, 4000 × 3000 becomes 2000 × 1500. At 30%, it becomes 1200 × 900, the same result as example 1, since 1200 ÷ 4000 = 0.30. The free image resizer lets you resize by pixels or by percent. You can also do the multiplication in any calculator.
In most image editors, the setting that does this math for you is called something like "constrain proportions," "maintain aspect ratio," or a chain-link icon between the width and height boxes. With it on, typing one dimension fills in the other. With it off, the two boxes are independent, and that's how most accidental stretching happens.
Common aspect ratios and their pixel sizes
These sizes are calculated from the ratios themselves. They aren't platform upload requirements, which change often. Each one divides exactly.
| Ratio | Width ÷ height | Typical use | Example sizes (pixels) |
|---|---|---|---|
| 1:1 | 1.0 | Square thumbnails, profile images | 500 × 500, 1080 × 1080, 2048 × 2048 |
| 4:3 | 1.333 | Many phone and compact cameras, older monitors | 800 × 600, 1024 × 768, 1600 × 1200, 4032 × 3024 |
| 3:2 | 1.5 | Many DSLR and mirrorless cameras, 4 × 6 in prints | 1200 × 800, 1800 × 1200, 3000 × 2000, 6000 × 4000 |
| 16:9 | 1.778 | Widescreen video, TVs, most monitors, slides | 1280 × 720, 1920 × 1080, 2560 × 1440, 3840 × 2160 |
| 4:5 | 0.8 | Tall portrait crops | 1080 × 1350, 1600 × 2000 |
| 9:16 | 0.5625 | Vertical phone video and full-screen stories | 720 × 1280, 1080 × 1920 |
To build your own sizes for any ratio, divide the width by the first number and multiply by the second. For 3:2 at 2400 wide, 2400 ÷ 3 = 800, and 800 × 2 = 1600, so the size is 2400 × 1600.
Note that 4:3 and 3:2 look close but aren't the same. Putting a 3:2 camera photo into a 4:3 frame always means cropping or adding bars.
Changing the shape: crop, letterbox, or stretch
When the target shape differs from your image's shape, you have three options. Here's what each one does to a 4000 × 3000 (4:3) photo that has to become a 1920 × 1080 (16:9) image.
Cropping (fill the frame)
Scale the image so it covers the whole frame, then trim the overflow.
- Scale to the target width: height = 1920 × 3000 ÷ 4000 = 1440. The image is now 1920 × 1440.
- The frame is only 1080 tall, so 1440 − 1080 = 360 rows have to go.
- Cropping from the center removes 180 rows from the top and 180 from the bottom.
- You lose 360 ÷ 1440 = 25% of the picture.
You get the same answer by cropping the original first: a 16:9 crop of a 4000-wide image is 4000 × 9 ÷ 16 = 2250 tall, so you drop 750 of 3000 rows, which is also 25%. Cropping keeps proportions perfect but can cut off heads, text, or edges. Move the crop window off-center when the subject isn't in the middle.
Letterboxing or pillarboxing (fit the frame)
Scale the image so it fits entirely inside the frame, then fill the empty space with a solid color or a blurred copy.
- Scale to the target height: width = 1080 × 4000 ÷ 3000 = 1440. The image is 1440 × 1080.
- The frame is 1920 wide, so 1920 − 1440 = 480 pixels are empty, 240 on each side.
Bars at the top and bottom are called letterboxing. Bars on the sides, as here, are pillarboxing. Nothing is lost or distorted, but part of the frame isn't picture.
Stretching (force the size)
Type 1920 × 1080 with proportions unlocked. The width is scaled by 1920 ÷ 4000 = 0.48 and the height by 1080 ÷ 3000 = 0.36. Because 0.48 ÷ 0.36 = 1.333, everything comes out 33% wider than it should be. Circles become ovals and faces look wide. Small mismatches of 1 to 2% are hard to see, but anything over a few percent usually shows, especially on faces and logos.
| Method | Distortion | Content lost | Empty space | Best for |
|---|---|---|---|---|
| Crop | None | Yes (25% here) | None | Photos with a centered subject |
| Letterbox/pillarbox | None | None | Yes (480 px here) | Screenshots, documents, artwork that must stay whole |
| Stretch | Yes (33% here) | None | None | Almost never; only tiny mismatches |
On websites you often don't need to change the file at all. The CSS object-fit property shows an image cropped (cover) or fitted with empty space (contain) inside a box. The aspect-ratio property reserves a box of a set shape before the image loads.
Resampling methods: how the new pixels are calculated
Resizing creates a new pixel grid. Every new pixel's color has to be worked out from the old pixels around it, and the resampling method, also called interpolation, is the rule for doing that. Many editors let you choose. Others pick one for you.
| Method | How it works | Result | Good for |
|---|---|---|---|
| Nearest neighbor | Copies the closest original pixel | Hard, blocky edges; no new colors | Pixel art, icons, screenshots scaled by whole numbers (200%, 300%) |
| Bilinear | Averages the nearest 2 × 2 pixels | Smooth, slightly soft | Quick previews, moderate resizing |
| Bicubic | Weighs a 4 × 4 neighborhood | Smoother gradients, crisper than bilinear | General photo resizing |
| Lanczos | Uses a wider, sharper weighting | Crisp detail; can add faint halos at high-contrast edges | Downscaling photos where sharpness matters |
Downscaling vs upscaling
Making an image smaller throws data away, and good resampling averages it cleanly. Shrinking by a large factor with a crude method can produce aliasing: jagged edges or shimmering patterns on fine textures such as fabric or brick. If that happens, use a smoother method such as bicubic or Lanczos, or shrink in one step from the original with a proper filter. If the result looks a little soft instead, light sharpening after resizing helps, but it won't remove jagged edges or moiré.
Making an image larger can't add real detail. A 600-pixel-wide photo enlarged to 2400 has 4 times the width, so each original pixel has to cover the area of a 4 × 4 block of new pixels, and the result looks soft. AI upscalers can produce convincing new detail, but it's generated, not recovered. Don't treat it as accurate for documents or evidence.
Mistakes that cause stretching or blur
Typing both dimensions with proportions unlocked
This is the most common cause of distortion. Enter only one dimension, or check the result with the decimal test: new width ÷ new height should match the original's width ÷ height to two or three decimal places.
Width and height swapped by phone rotation
Phones often save the pixels in landscape and record "rotate this" in the photo's metadata, known as the EXIF orientation tag. Some tools read the tag and some ignore it. As a result, a portrait photo can show up as 4032 × 3024 instead of 3024 × 4032. If your calculated height looks wrong, check which way the tool thinks the image is facing before you resize.
Resizing the same file again and again
Each resize resamples the pixels, and each save as JPG adds compression artifacts. Shrinking to 800 pixels, then deciding you want 1200 and enlarging again, gives a blurrier result than going straight from the original. Keep the original and make every size from it.
Confusing pixel size with file size
Halving the width and height cuts the pixel count to a quarter: 4000 × 3000 is 12,000,000 pixels, and 2000 × 1500 is 3,000,000. That usually shrinks the file a lot, but file size also depends on format and compression. If the goal is a lighter file, see how to compress images for web after resizing.
Quick reference for proportional resizing
- Find the shape: width ÷ height. Same decimal means same shape.
- Know the width, need the height: new width × original height ÷ original width.
- Know the height, need the width: new height × original width ÷ original height.
- Scale by percent: multiply both sides by the same factor. The ratio is always kept.
- Round to whole pixels. Use even numbers for video.
- Different target shape? Crop to fill, or letterbox/pillarbox to fit. Don't stretch.
- Share lost to a crop: (scaled dimension − target dimension) ÷ scaled dimension.
- Stretch factor: horizontal scale ÷ vertical scale. Anything far from 1.0 will look distorted.
- Resampling: nearest neighbor for pixel art, bicubic or Lanczos for photos.
- Jagged edges or moiré after shrinking: switch to a better filter and resize from the original. Sharpening only helps softness.
- Always resize from the original file, and compress as a separate final step.
Frequently Asked Questions
How do I make a non-square photo into a square like 1080 × 1080 without stretching it?
Crop it to 1:1 first, then resize. For a 4000 × 3000 photo, a square crop is 3000 × 3000, which removes 500 pixels from each side if centered. Then scale the square down to 1080 × 1080. If you can't lose the edges, place the whole photo on a 1080 × 1080 canvas and fill the leftover space with a solid color.
Does changing the DPI setting resize an image?
Changing DPI or PPI alone doesn't change the pixel dimensions. It only changes how large the image prints, so a 3000 × 2000 image stays 3000 × 2000. Some editors resample when you change DPI unless resampling is turned off, so check the pixel dimensions after making the change.
What aspect ratio is 1080 × 1350?
It's 4:5. Both numbers divide by 270: 1080 ÷ 270 = 4 and 1350 ÷ 270 = 5. As a decimal, width ÷ height is 0.8, so it's a portrait shape, 25% taller than it is wide.
Does resizing an image reduce its quality?
Shrinking an image discards detail, but at the smaller size it usually looks sharp, especially with bicubic or Lanczos resampling. Enlarging an image can't create real detail, so it tends to look soft or blocky. Saving repeatedly in a lossy format like JPG adds more loss, so resize from the original and save once.