Calculators
Aspect ratio calculator
This aspect ratio calculator finds the exact ratio from a width and height, or calculates a missing width or height from a chosen ratio. Choose how a fractional pixel result rounds. It runs in your browser, and when rounding changes the shape, shows the output ratio along with the requested one.
Your dimensions
Find the ratio or calculate a missing dimension.
Loading calculator…
Your result
Enter dimensions and select Calculate to see their exact ratio.
Exact ratio · width:height
Output proportions preview; very thin shapes may be smaller than a screen pixel.
- Output width
- Output height
- Exact width
- Exact height
- Output ratio
Fractions show numerator ÷ denominator, exactly.
Select result text
How to use the aspect ratio calculator
Under Calculate, choose Ratio from width and height, Height from width and ratio, or Width from height and ratio. Ratio mode uses Width (px) and Height (px), both positive whole numbers.
The other two modes ask for Ratio width and Ratio height, positive decimals such as 16 and 9 or 1.85 and 1, plus one pixel dimension and a Missing dimension rounding select: Nearest whole pixel (ties up), Round down, Round up, or Exact fraction — no rounding. Four Common ratios buttons (16:9, 4:3, 1:1, 9:16) fill in Ratio width and Ratio height and switch to Height from width and ratio if Calculate is set to the ratio mode.
Select Calculate. When rounding changes the missing dimension, the result adds its exact value and an Output ratio line, and Download text keeps both in aspect-ratio-result.txt.
How rounding changes the result
Height from width and ratio and Width from height and ratio can produce a fractional pixel value, since a ratio and one pixel dimension rarely divide evenly. At 16:9 with a width of 1000, the exact height is 1125/2, or 562.5.
Nearest rounds a tie up, so 562.5 becomes 563; Round down gives 562; Round up gives 563; Exact fraction keeps 1125/2 and skips rounding entirely. Rounding a dimension changes the output ratio away from the requested one: at 563 the calculator reports an output ratio of 1000:563, not 16:9.
The preview shape always reflects the output ratio, not the requested one, so a rounded result and its preview always agree. This holds in every mode; Ratio from width and height never rounds, because it only simplifies a width and height you already have.
Limits
Tire sizes use a different formula: a tire aspect ratio is sidewall height as a percentage of tire width, and this calculator has no field for it. A width such as 9007199254740993, past the point where floating point starts to lose whole numbers, still reduces to an exact ratio.
Pixel dimensions must be positive whole numbers; a zero or negative width or height is rejected. Ratio width and Ratio height take a positive decimal number, written with a period rather than a comma and without scientific notation. If a rounding choice would produce zero pixels for the missing dimension, the calculator returns an error instead of a 0 px result; Round up, Exact fraction, or a larger known dimension avoids it.
The math uses exact integer and fraction arithmetic, so no dimension is rounded except by the Missing dimension rounding choice, which starts at Nearest whole pixel (ties up). The preview shape is an approximate drawing; the numbers stay exact.
Questions
How do I calculate aspect ratio?
Choose Ratio from width and height, then enter Width (px) and Height (px) as positive whole numbers. Selecting Calculate divides the width by the height and reduces the fraction by its greatest common divisor, so 1920 by 1080 gives 16:9. The result panel shows this exact reduced ratio.
Is 1920x1080 a 4:3 aspect ratio?
No. 1920x1080 reduces to 16:9, not 4:3. Choose Ratio from width and height, enter 1920 as Width (px) and 1080 as Height (px), then select Calculate; the result shows 16:9. A 4:3 image at the same width would need a height of 1440 pixels instead.
Is 1080x1920 a 16:9 aspect ratio?
No. 1080x1920 reduces to 9:16, the portrait form of 16:9. Enter 1080 as Width (px) and 1920 as Height (px) with Ratio from width and height; the result shows 9:16. Swap the two numbers to get 16:9.
Does rounding change the output ratio?
It can. See "How rounding changes the result" above for the worked example. The result panel shows both the requested ratio and the rounded output ratio when they differ. A width that is a multiple of the first number in the reduced ratio avoids it entirely: 1600 at 16:9 gives an exact height of 900, with no rounding needed.
Can I use a decimal ratio, such as 1.85:1?
Yes. Enter 1.85 as Ratio width and 1 as Ratio height in either dimension mode. The calculator reduces it to the exact fraction 37:20 before finding the missing dimension. Ratio parts accept positive decimals with a dot; commas, signs and exponent notation are rejected.
Related tools
- Simplify ratios, scale equivalent pairs and find a missing value with exact arithmetic: solve a general A:B ratio instead of a pixel width and height.
- Resize an image to exact pixel dimensions: resize the actual image file to the dimensions this calculator finds.
- Split a length using phi, find matching dimensions and compare rounded pixel layouts: use the golden ratio instead of a custom width-to-height ratio.
- Crop an image to exact pixel dimensions: crop a photo to the calculated ratio.