Image Dimensions + Aspect Ratio Calculator

Resize an image to a target dimension while preserving aspect ratio. Reports the GCD-simplified ratio (16:9, 4:3 โ€ฆ) and total megapixels.

Inputs

Result

Resized dimensions
800 ร— 450 px
Aspect ratio 16:9 (HDTV widescreen) preserved.
  • Original1920 ร— 1080 px (2.07 MP)
  • Aspect ratio16:9 (HDTV widescreen)
  • Pixel ratio16:9
  • Resized800 ร— 450 px (0.36 MP)
  • Scale factor41.67% width / 41.67% height
  • Diagonal918 px
Note โ€” Integer rounding applied on the scaled axis; for sub-pixel precision use a graphics tool that supports fractional dimensions.

Step-by-step

  1. GCD(1920, 1080) = 120 โ†’ simplified ratio 16:9.
  2. Lock width to 800; height = width ยท (originalH/originalW) = 450.

How to use this calculator

  • Type the original pixel dimensions.
  • Choose what to lock โ€” width, height, or a percent scale.
  • Read the resized dimensions and the recognised aspect-ratio name.

About this calculator

Resizing an image without warping it is straightforward arithmetic โ€” keep the new-width-to-new-height ratio equal to the old-width-to-old-height ratio โ€” but doing it by hand is the kind of small mistake that leaks into thumbnails, social-media previews, and printed marketing material. This calculator does the arithmetic, names the aspect ratio when it matches a common standard, and reports the GCD-simplified pixel ratio for cases that do not.

How it works โ€” the formula

aspect = w/h (invariant under proportional scaling) ratio = w/gcd(w,h) : h/gcd(w,h) megapixels = wยทh / 1e6

Aspect ratio is invariant under proportional scaling. The GCD-reduced fraction gives the canonical name (1920:1080 โ†’ 16:9).

Worked examples

Example 1
1920ร—1080 โ†’ 1280-wide
Inputs:
w=1920, h=1080, mode=width, newW=1280
Output:
1280ร—720 (16:9, 0.92 MP)
Example 2
4032ร—3024 โ†’ 50%
Inputs:
w=4032, h=3024, mode=percent, pct=50
Output:
2016ร—1512 (4:3, 3.05 MP)
Example 3
3000ร—3000 โ†’ 1080-high
Inputs:
w=3000, h=3000, mode=height, newH=1080
Output:
1080ร—1080 (1:1, 1.17 MP)

Limitations

  • Integer rounding may cause sub-pixel drift on extreme aspect-ratio-mismatched targets.
  • Aspect-ratio name detection uses ยฑ0.01 tolerance; unusual ratios are reported by their GCD-reduced fraction.
  • No file-size estimation โ€” that depends on encoder, codec, and content complexity.

Pure arithmetic โ€” works for any input range up to 100,000 px per axis.

Frequently asked

16:9 โ€” the SMPTE ST 274 standard for HDTV and the default for nearly every modern display, smartphone-shot landscape video, and YouTube upload.

Related calculators

More tools you might like