Aspect Ratio Calculator
Find a simplified pixel ratio and calculate either target width or target height. Compare the mathematical dimension, nearest rounded pixels and a nearby whole-pixel size that preserves the ratio exactly.
Proportions versus raster pixels
- Target height = target width × original height ÷ original width; reverse the ratio to solve width.
- Rounding a dimension can change the ratio. Exact-ratio sizes are positive integer multiples of the reduced width and height.
How to use the Aspect Ratio Calculator
- Enter positive whole original width and height in pixels.
- Choose Height from target width or Width from target height, then enter that target dimension.
- Compare the mathematical value with rounded pixels. Use the nearby exact-ratio size when both dimensions can change.
Rounding and limits
The nearby exact size minimizes the difference in the entered target dimension; ties choose the larger multiple. Repeating mathematical values are displayed approximately.
This tool uses numeric dimensions only. It does not upload or resize files. Use Image Resizer for an actual file and check its format, byte and dimension requirements separately.
Examples
A fractional ideal height
At width 1000, a 16:9 image has mathematical height 562.5 pixels, rounded to 563. The nearby exact-ratio size is 1008 × 567; 992 × 558 is equally close in width, so the larger size is chosen.
Solve portrait width
An original 1080 × 1920 is 9:16. Target height 1280 gives width 720 exactly.
Frequently asked questions
Is a rounded size still exactly the same ratio?
Not always. A 1000 × 563 raster is close to 16:9 but does not equal it exactly.
Why can the nearby exact size change my entered dimension?
It chooses an integer multiple of the reduced ratio. Both dimensions may need to change to preserve that ratio exactly.
Can I resize an image file here?
No. This calculator handles numbers only; follow the contextual link to Image Resizer for file processing.
More image tools
Image Resizer
Resize JPG, PNG and WebP by pixels or percentage. Keep the source ratio or set exact dimensions, then compare JPG, PNG or WebP output.
Open tool →Image Compressor
Re-encode JPG, PNG or WebP at original dimensions with a WebP quality setting. Compare measured file sizes and download the actual browser output.
Open tool →Compress Image to Target KB
Try a JPEG quality and dimension search for a target KB limit. Accepts JPG and PNG; reports missed targets and fills transparency white.
Open tool →HEIC to JPG
Try HEIC/HEIF to JPEG conversion with heic2any in the browser. Review codec limits, quality, metadata and single-image output.
Open tool →WebP to JPG
Convert one still WebP image to JPEG with adjustable quality and a white background. Check dimensions, byte size and browser support.
Open tool →WebP to PNG
Convert one still WebP image to PNG with alpha support. Retain decoded dimensions and understand why output size may increase.
Open tool →