Neatbo.

Aspect ratio calculator

Reduce a width and height to a ratio, then plan a proportional pixel size.

Browser-local processingInputWidth/heightOutputRatio and pixel dimensions
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.

⌘ / Ctrl + Enter to run

Original dimensions

Plan a proportional size

Set one new side to calculate the other without stretching.

Set new
Preparing the tool…

Before you start

Enter a pixel width and height to see their simplified ratio. Set a new width or height to calculate the other side. Fractional pixels are rounded to the nearest whole pixel.

How to use this tool

  1. Enter the original width and height in pixels.
  2. Choose which new side to set, then enter its pixel size.
  3. Calculate to see the simplified ratio and proportional new dimensions; copy or download the note.

Supported inputs and limits

Dimensions must be positive whole pixels from 1 to 1,000,000,000. Results that round to zero or exceed this range are rejected.

This calculates dimensions only; it does not resize, crop, or alter a file. All input stays in this browser.

This is the pixel width-to-height ratio. Video with non-square pixels can have a different displayed aspect ratio.

Worked example

Example input

Example options
{
  "width": 1920,
  "height": 1080,
  "lock": "width",
  "target": 1280
}

Example output

{
  "ratio": "16:9",
  "sourceWidth": 1920,
  "sourceHeight": 1080,
  "width": 1280,
  "height": 720,
  "exact": true,
  "rounding": "nearestInteger"
}

When something does not work

Use positive whole-pixel dimensions within the displayed range. If the proportional side would round to zero, set a larger new side. Editing an input marks the earlier result as out of date; a failed calculation clears it.

Frequently asked questions

Will this resize my image or video?

No. This is a sizing planner. It calculates a ratio and dimensions; use an editor or resizer to change a file.

Why is the new ratio sometimes approximate?

Pixels are whole numbers. When the proportional side is fractional, the calculator rounds it to the nearest whole pixel and marks the result as approximate.

Documentation & further reading

Related tools