Aspect ratio calculator

Reduce an integer ratio exactly, or calculate a missing width or height from a ratio and one known dimension.

Numbers: 0–9, ٠–٩ or ۰–۹, with a decimal point or ٫. No exponents or grouping separators. Local processing without uploads or automatic storage. Output up to 16 KiB.

Ratio width and height are positive integers up to 10⁹. The known dimension is 0.000001–10⁹ with up to 6 decimal places; output above 10⁹ is rejected. BigInt reduction is exact. Calculated dimensions round to 6 places, ties away from zero; this is not whole-pixel rounding.

How to use

Enter ratio width and height and choose reduction or the missing dimension. Supply known height when calculating width, or known width when calculating height. Generate, check whether the displayed result is exact or rounded, then copy or download the text.

Try an example

1920:1080 reduces to 16:9. With that ratio, height 720 gives width 1280, and width 320 gives height 180.

Support & limits

Reduction uses the greatest common divisor and BigInt without integer precision loss. Dimensions use exact rational decimal arithmetic, then round to 6 decimal places with ties away from zero; trailing zeroes are removed. A positive result below half of 10⁻⁶ can display as 0, with a rounding notice. No whole-pixel rounding or unit detection is applied; keep units consistent. Download contains only the ratio or calculated dimension, followed by LF.

Common questions

Does this resize an image?

No. This is a numerical calculator and reads no files. Use the image resize tool to change image pixels.

Related tools