Aspect Ratio Calculator

Simplify any width and height to its lowest terms, or lock a ratio (16:9, 4:3, 21:9, 1:1, 9:16 or custom) and solve for the missing dimension.

🌐 Español

🔒 Private by design: everything is generated locally in your browser and never uploaded to any server.

Two different questions, answered in one report

Aspect ratio work splits neatly into two jobs, and most calculators only do one of them. The first is descriptive: you have a width and a height and want to know what shape that is. The second is prescriptive: you know one dimension and the shape you need, and want the other dimension. This page always answers the first and answers the second as well whenever you lock a ratio, so a single run tells you both what you have and what you should target.

  1. Type your pixel dimensions into Width (px) and Height (px).
  2. To solve as well as describe, pick a shape under Lock a ratio and solve for the other dimension.
  3. Under When a ratio is locked, solve for, choose which side the calculator should compute. The other side keeps the value you typed.
  4. Click the Aspect Ratio Calculator button and read the report, then copy it if you need to paste the numbers somewhere.

Leave the lock alone and the report simply analyses what you typed and says so explicitly, which is the fastest way to answer “is this screenshot actually 16:9”.

Greatest common divisor is the whole trick

An aspect ratio is a fraction in lowest terms, nothing more exotic. 1920 and 1080 share a greatest common divisor of 120, and dividing both by it lands on 16:9. 3840 by 2160 looks like a different animal but shares a divisor of 240 and lands on exactly the same 16:9, which is why 4K footage drops into a 1080p timeline without letterboxing. The reduction runs through the Euclidean algorithm, so it is not matching your numbers against a table of known shapes; any pair reduces correctly, table or no table.

Alongside the reduced form the report prints the decimal ratio to at most four places, trailing zeros dropped, which is often the more useful number of the two. Comparing 1.7778 against 1.85 tells you instantly how far apart two shapes are; comparing 16:9 against 37:20 does not.

The half pixel the report refuses to hide

Solving is a multiplication, and multiplications do not respect whole pixels. Lock 16:9, keep a width of 1000 and solve for height and the exact answer is 562.5, which becomes 563. That single rounded pixel means the output is no longer mathematically 16:9, and depending on what you feed it to, an encoder may pad, crop or refuse an odd dimension outright.

Rather than print 563 as though it were exact, the report says the value was rounded and shows what it was rounded from. When you see that line, the usual move is to nudge the known dimension to something that divides evenly. A width that is a multiple of 16 always gives a whole 16:9 height, which is why 1280, 1920 and 3840 keep turning up in specification sheets and 1000 does not.

Ultrawide “21:9” is marketing, not arithmetic

This one catches people out constantly. A monitor sold as 21:9 is usually 2560 by 1080 or 3440 by 1440, and neither of those is 21:9. Put 2560 by 1080 in and the report reduces it to 64:27, roughly 2.3704. Put 3440 by 1440 in and it reduces to 43:18, roughly 2.3889. Mathematical 21:9 is about 2.3333, and reduces to 7:3.

The calculator does not paper over this. Because preset matching is done by cross-multiplication against the exact 21 to 9 fraction, an ultrawide resolution correctly matches nothing, and the 21:9 example resolutions the report offers are genuinely 21:9 values rather than the marketing ones. If you are mastering a video for an ultrawide display, take the display’s real reduced ratio from the report rather than trusting the label on the box.

Carrying the numbers into an actual resize

A ratio on its own does not change anything, so the answer usually needs applying somewhere. Resize Images works from a target width and keeps the source proportions, which pairs neatly with a solved height here as a way to check what you are going to get before you get it. For video, Crop Video takes a centred rectangle at 9:16, 1:1 or 16:9 and throws away the overflow, while Resize Video for Social Media hits a target shape at a chosen resolution and lets you choose between cropping to fill and padding with bars. Knowing whether your source is already the target shape decides which of those two you want, and that is precisely what the simplified ratio at the top of the report tells you.

If you are working out what your own display is doing, What Is My Screen Resolution reads the real numbers off the device, including the pixel ratio, and those are the numbers to paste in here.

See it in action

Screenshot of the Aspect Ratio Calculator tool with Width (px) set to 1920, Height (px) set to 1080
Aspect Ratio Calculator mid-process: Width (px) set to 1920, Height (px) set to 1080.
Screenshot of the Aspect Ratio Calculator result screen showing the generated output “=== ASPECT RATIO CALCULATOR === Input dimensions…”
The finished result: the generated output “=== ASPECT RATIO CALCULATOR === Input dimensions…”. The download link is a local blob URL — the file never leaves your device.

Frequently asked questions

Why is the result a block of text instead of a download?

The calculator produces a short plain-text report and shows it in a read-only box on the page, with a copy button beneath it. There is no file to save, because a handful of lines of arithmetic is something you paste into a ticket, a shot list or a chat message rather than something you archive. Use the copy button and the whole report, including the input dimensions it was computed from, travels with the numbers.

Do the custom ratio fields do anything when a preset is selected?

No. Every option is always visible, so the two custom fields sit there whatever the lock is set to, but they are only read when the lock is set to the custom entry. Leaving them at their defaults while you use a preset changes nothing about the result, and there is no need to reset them between runs.

What does the calculator do with an odd input like 1920 by 1081?

It reports it faithfully. Simplification divides both numbers by their greatest common divisor, and when that divisor is 1 there is nothing to reduce, so the ratio is printed as 1920:1081 rather than being nudged toward a tidy nearby ratio. That is usually the answer you wanted, because it tells you the image is a pixel off a clean ratio rather than pretending it is not.

Can I use it for something that is not pixels, like a print size or a canvas in centimetres?

The arithmetic is unitless, so a ratio between any two numbers reduces the same way, but two behaviours are pixel-shaped and will bite you. Both inputs are rounded to whole numbers before anything is computed, so 21.5 becomes 22, and a solved dimension is rounded to a whole number too. For a print layout in millimetres that is often fine; for anything where a fraction matters, do the multiplication yourself from the decimal ratio the report gives you.

Why does the report sometimes list common resolutions and sometimes not?

The list only appears when the ratio in play is exactly one of the five named presets, checked by cross-multiplication rather than by eyeballing the decimal. Enter 2560 by 1440 and you get the 16:9 examples; enter 2560 by 1080 and you get none, because that shape is not any of the five. The examples are a sanity check on the ratio you landed on, not a suggestion to use one of them.

Are there limits on how large the numbers can be?

Yes. The width and height fields are clamped to between 1 and 1000000, and the two custom ratio fields carry a declared range of 1 to 1000. Out-of-range and unreadable values are clamped or fall back to the field's default rather than raising an error, and everything is rounded to a whole number first, so a stray keystroke still produces a sane report. Those bounds comfortably cover print resolutions and very large panoramas.

Related tools