Practical guidesImage & design

Calculate dimensions from an aspect ratio.

Find the simplified ratio of a width and height, then calculate a new size that keeps the same proportions. Copy the ratio, a CSS value, or a whole-pixel resize.

Open the aspect ratio calculator

Enter the original width and height

Open the aspect ratio calculator and type the original width and height, in pixels or any other consistent unit, into Your dimensions. The accepted range is 0.0001 to 1,000,000, with up to four decimal places.

You can start from a Common formats preset instead, such as Landscape 16:9 at 1920 × 1080, Vertical 9:16, Square 1:1, Portrait 4:5, Classic 4:3 or Photo 3:2, then change either dimension. Swap exchanges the width and height.

Example input

Width: 1920
Height: 1080

Read the simplified ratio

From 1920 × 1080 the calculator reports a 16:9 ratio, a decimal ratio of 1.7778, the CSS value 16 / 9, and an orientation of Landscape. A square is reported when the sides are equal; otherwise the larger side decides Landscape or Portrait.

The preview shows the shape, not a thumbnail of your file. The calculator does not open, crop or export image files; it only works out dimensions.

Example result

Ratio: 16:9
Decimal ratio: 1.7778
CSS aspect-ratio: 16 / 9
Orientation: Landscape

Calculate a new size that keeps the ratio

Under Calculate a new size, enter a whole-pixel width or a whole-pixel height. The other side is then rounded to a whole pixel so the proportions stay as close as possible. For 1920 × 1080, a target width of 1280 gives 1280 × 720.

Other sizes that fit lists widths of 1920, 1280, 1080, 720, 640 and 320, with the matching height rounded to a whole pixel. You can copy the ratio, the CSS value, the decimal, a scale row, or the resized pair.

Example result

1280 × 720 px
Other sizes: 1920 × 1080, 1280 × 720, 1080 × 608, 720 × 405, 640 × 360, 320 × 180

Use the CSS value on a page, not as a crop

The CSS figure is meant for an aspect-ratio property, such as aspect-ratio: 16 / 9;. It describes the shape of an element. It will not crop an existing image or keep a file within a byte limit.

If you later need a printable code at a chosen size, the QR code generator can download a 512 or 1024 pixel PNG, which is independent of this calculator.

Open the aspect ratio calculator