Images & screens

Aspect Ratio Calculator

Find a rectangle's ratio, resize pixel dimensions, or work out a screen's physical width and height.

Calculate an aspect ratio and resize dimensions

Enter width and height in the same unit, or enter ratio parts such as 16 and 9.

Positive values; up to 15 integer digits and 10 decimal places. Correctly grouped thousands commas are accepted.

Use a common ratio

A whole number from 1 to 1,000,000,000 pixels. Leave blank to calculate the ratio only.

The other dimension is calculated without cropping or padding.

Find a screen's physical size — optional

Uses the original width-to-height ratio above and a corner-to-corner diagonal. Leave blank to skip screen size. For a flat rectangular display; excludes bezels, casing, and stand.

Exact width : height ratio

Enter your dimensions, then select Calculate.

Numbers are calculated in your browser. This tool does not upload or edit images.

The same shape at a different resolution

Simplify

1920 × 1080 becomes 16:9

1920 : 1080 = 16 : 9

Divide both dimensions by their greatest common divisor, 120. A 3840 × 2160 image also has a 16:9 ratio, even though its resolution is different.

Aspect ratio describes shape; resolution describes pixel dimensions.

Resize from width

Find the height at 1280 pixels

New height = new width × height ÷ width

For 16:9, the calculation is 1280 × 9 ÷ 16 = 720 pixels. Both dimensions are integers, so 1280 × 720 preserves the ratio exactly.

From a chosen height, use new width = new height × width ÷ height.

Compare rounding

A 100-pixel-wide 16:9 image

100 × 9 ÷ 16 = 56.25 pixels

The nearest whole height is 56. The resulting 100 × 56 frame has ratio 25:14, about 0.4464% wider relative to 16:9.

Deviation = ((rounded width ÷ rounded height) ÷ original ratio − 1) × 100%.

Compare two 27-inch screens: wider does not mean taller

Starting size

27 inches at 16:9

Width = 27 × 16 ÷ √(16² + 9²)

Enter 16 as Original width, 9 as Original height, and 27 inches as Screen diagonal. Leave New width blank. The active display is about 59.77 cm wide × 33.62 cm high (23.53 × 13.24 inches).

These are the visible rectangle's dimensions. The frame and stand are not included; use the device's outside dimensions to check desk or shelf fit.

Same diagonal, different shape

27 inches at an exact 21:9 ratio

Width = 27 × 21 ÷ √(21² + 9²)

Change Original width to 21 and keep height at 9 and diagonal at 27 inches. The active display is about 63.03 cm wide × 27.01 cm high (24.82 × 10.64 inches): about 3.26 cm wider and 6.61 cm shorter than the 16:9 example.

Extra physical width can come at the cost of height when the diagonal stays fixed. Compare both dimensions for your workspace. This is a geometric example, not the specification of a particular monitor; differences use unrounded dimensions.

General formula

Use the diagonal and any ratio

Width = D × W ÷ √(W² + H²)
Height = D × H ÷ √(W² + H²)

W and H are the original ratio parts; D is the screen diagonal. The Pythagorean theorem gives the diagonal of the corresponding rectangle. Width and height use D's unit before conversion.

The international inch is exactly 2.54 centimeters. See NIST's length-unit reference.

Common questions

Can I enter a decimal ratio such as 2.39:1?

Yes. Enter 2.39 as width and 1 as height. The exact reduced ratio is 239:100. Decimal inputs are treated as exact entered values. If 2.39 is itself a rounded description of your source, the calculator cannot recover the source's unrounded ratio.

Does resizing to whole pixels always preserve the ratio?

No. An exact result may require a fractional dimension. Only the derived dimension is rounded; your chosen target stays fixed. Halfway values round up, so 10.5 pixels becomes 11. The displayed deviation measures the change in width divided by height, relative to the original ratio. It is not an estimate of perceived image quality.

What happens when the other dimension is less than one pixel?

If the nearest whole-pixel value is zero, no whole-pixel frame is shown. Increase the target dimension. Values of at least 0.5 pixels round to one pixel, but this may change the aspect ratio substantially; inspect the deviation before using the size.

Does this resize, crop, or upload my image?

No. It calculates dimensions from the numbers you enter. It does not upload a file, resample pixels, remove content, or add padding. Cropping or fitting an image into a different fixed ratio needs a separate choice about which content to keep.

Can I use dimensions in inches or centimeters?

Yes, for the original pair, provided width and height use the same unit. The ratio has no unit. Enter an optional screen diagonal in inches or centimeters to get the physical width and height in both units. The separate resize target is specifically a whole number of pixels, so its output remains in pixels. This tool does not calculate print density or DPI.

Does a higher pixel resolution make a screen physically bigger?

No. A 1920 × 1080 screen and a 3840 × 2160 screen both have a 16:9 pixel ratio. With square pixels and the same 27-inch diagonal, each has the same approximate active dimensions: 59.77 × 33.62 cm. More pixels do not add physical width or height. How much content fits on screen also depends on the operating system's scaling and the application's zoom, which this calculator does not model.

Will these dimensions tell me whether a monitor fits on my desk?

They estimate the active rectangular screen area from the supplied diagonal and ratio. The complete monitor can be wider, taller, and deeper because of its casing, bezel, and stand. Rounded advertised sizes may differ from the actual panel diagonal. Use the manufacturer's outside dimensions for desk fit. This flat-screen model does not account for curvature or rounded display corners.

Which input limits and rounding rules apply?

Original dimensions and an entered screen diagonal must be positive and may contain up to 15 integer digits and 10 decimal places. Use a period for decimals and a leading zero, as in 0.5. The target must be a whole number from 1 to 1,000,000,000 pixels. Fractions, units, expressions, and scientific notation are not accepted. The derived size may exceed common image-editor limits; these are mathematical dimensions, not a guarantee that an application can create that image. Exact integer arithmetic preserves the ratio and fractional pixel size. Screen dimensions use decimal arithmetic with 100 significant digits for the square root and unit conversion. Decimal displays use up to 2, 4, 6, or 10 places and round halfway away from zero.

How does this relate to aspect ratio on a web page?

Both use the relationship width divided by height. A web layout may also apply size constraints, borders, and content rules. See MDN's explanation of the CSS aspect-ratio property for how browsers use a preferred ratio when sizing an element.