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
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.
Frequently asked
What aspect ratio is HD video?+
What is the difference between resolution and aspect ratio?+
How do I scale to an Instagram post?+
Why does my video look stretched after resizing?+
Does this account for DPI / PPI?+
Related calculators
More tools you might like
Hand-picked tools that pair well with this one — same audience, same intent.
Convert a color between hex, RGB, HSL, HWB, and CMYK. Reports relative luminance and WCAG 2.2 contrast ratio against white and black.
Calculate what X% of a value is, find what percentage one number is of another, or compute the percentage change between two numbers.
Six-mode percentage tool — X% of Y, X is what % of Y, % change, % difference (symmetric), add %, and subtract %.
LTV / CAC ratio. Healthy SaaS: 3:1+; under 1:1 burns money.
Estimate image file size by format and quality (JPEG, PNG, WebP, AVIF) from width and height, using typical bits-per-pixel figures.
Resize an image to a new width or height while preserving the original aspect ratio — with preset 16:9, 4:3, 1:1, 21:9.