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.
Result
- 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
Step-by-step
- GCD(1920, 1080) = 120 โ simplified ratio 16:9.
- 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 / 1e6Aspect ratio is invariant under proportional scaling. The GCD-reduced fraction gives the canonical name (1920:1080 โ 16:9).
Worked examples
- Inputs:
- w=1920, h=1080, mode=width, newW=1280
- Output:
- 1280ร720 (16:9, 0.92 MP)
- Inputs:
- w=4032, h=3024, mode=percent, pct=50
- Output:
- 2016ร1512 (4:3, 3.05 MP)
- 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.