Aspect Ratio Calculator
Feed the page one measurement and it returns the matching one, or read the ratio that a pair of pixel values already contains. There are three modes, and each answers a slightly different question about width and height.
Three Questions About Width and Height
The mode selector decides what the rest of the page does. Choosing a preset lets you scale a width and read the height that keeps the shape; entering two pixel counts reduces them to the smallest whole-number ratio that describes them; and the resize mode takes an original size plus a new width and works out how tall the result has to be. Nothing here opens, decodes or rewrites an image file. The numbers are arithmetic, and the output is text you copy by hand.
- Mode one, calculate dimensions from ratio, pairs a preset with a target width. The presets are 16:9 for HD and YouTube, 4:3 for older displays, 3:2 for DSLR stills, 1:1 for square posts, 9:16 for vertical stories, and 21:9 for widescreen framing.
- Mode two, calculate ratio from pixels, takes two positive whole numbers and divides both by their greatest common divisor, so 1920 by 1080 comes back as exactly 16:9 instead of a long decimal.
- Mode three, resize maintaining ratio, reads an original width and height, then multiplies the new width by the original height divided by the original width. The answer is rounded to the nearest whole pixel.
- The target width box starts at 1920 and the original-size boxes start at 4000 by 3000, so the page produces a sensible answer before you touch anything. It runs once when the document finishes loading.
Getting a Number You Can Use
- Pick the mode first, because the fields below it change. A preset and a width appear in the first mode, two pixel boxes in the second, and four boxes in the third.
- In preset mode, leave the preset alone if you only want to scale a known shape, then type the width you are targeting. The height follows on its own.
- In pixel mode, enter the real width and height of the file in front of you. Keep both as whole numbers, since anything after a decimal point is dropped when the page reads the box.
- In resize mode, give the original size and the new width. Leave the second height box empty unless you have a specific height you must hit.
- Press Calculate, or press Enter while the cursor sits in a box. Either action redraws the answer panel.
What the Defaults Return
These are the figures the page produces for a handful of inputs. The last three show how the modes differ in wording as well as in maths, which is the part that tends to catch people out.
- Preset 16:9 with a width of 1920 returns a height of 1080 pixels, and the panel repeats the shape as 16:9.
- Preset 21:9 with a width of 1920 returns 823 pixels. The exact product is 822.86, and the page rounds it, so a widescreen height lands one pixel above the true decimal.
- Preset 4:3 with a width of 1920 returns 1440 pixels, which is the classic pillar-boxed presentation width.
- Pixel mode with 1920 and 1080 returns 16:9. The common divisor is 120, which is why the pair collapses cleanly instead of turning into long awkward numbers.
- Pixel mode with 4000 and 3000 returns 4:3, because the greatest common divisor is 1000. The same two numbers in resize mode are described differently, as the next line shows.
- Resize mode with an original of 4000 by 3000 and a new width of 1920 returns a new height of 1440, and prints the maintained shape as 4000:3000, the raw original pair rather than its reduced form.
- If you type a value into the new-height box, that typed value is displayed instead of the calculated one. The box does not lock, and it does not warn you that the shape is no longer preserved.
Three Ways to Describe the Same Shape
| Alternative | Notes |
| Work forwards from a preset | Best when you already know the shape you want and only need the missing side. Six presets cover most screen, social and camera formats, and the arithmetic is a single multiplication followed by a rounding step. |
| Work backwards from pixels | Best when you have a file in front of you and want to name its shape. This is the only mode that reduces, and the reduction is exact, so common resolutions turn into familiar ratios like 16:9 or 4:3 rather than decimals. |
| Scale an existing canvas | Best when the original shape is odd and you are resizing rather than labelling. It keeps the source proportion to several decimals, so a 4000 by 3000 source lands on 1440 for a 1920 target instead of snapping to a preset value. |
| Doing it by hand | Dividing height by width on a calculator gives the same decimal the page uses internally. The page adds the rounding and the reduced-ratio step, and those are the two places hand arithmetic usually goes wrong. |
What Runs Where
The whole tool is a handful of arithmetic lines inside the page. There is no canvas, no file picker and no image decoding, so nothing you type leaves the browser and no picture is ever uploaded.
- All three modes share one answer panel. Switching mode hides the fields that no longer apply and clears nothing, so values you typed earlier are still sitting there if you switch back.
- The calculation fires from the button, from the Enter key inside a box, and once automatically as the page loads, in that order of likelihood.
- The answer is written as text and is not saved anywhere. Reloading returns every field to its starting value.
- Because no file is read, the page cannot discover the true proportions of a photograph on your disk until you type its pixel dimensions in yourself. It has no idea how large the file is.
- The only things stored on your device are the light or dark theme choice and a bookmark flag if you use the bookmark button. Neither has anything to do with the calculation.
Aspect Ratio Questions
Why does the resize mode say the shape is 4000:3000 instead of 4:3?
Because that line repeats the original width and height exactly as you entered them, without reducing. It is a reminder of the source proportions, not a simplified ratio. The reduced value of those two numbers is 4:3, and you can read it from pixel mode by entering the same pair there.
Does the new-height box actually do anything?
Yes, and it is easy to miss. Left empty, the page fills in the height that preserves the shape. If you type a number there, that number is printed instead, so you can force a shape change. The preserved-shape line underneath still shows the source proportions and will no longer describe your output.
Why is 21:9 at 1920 rounded to 823 rather than 822.86?
Pixel dimensions have to be whole numbers, so the page rounds the product. 1920 multiplied by 9 and divided by 21 gives 822.857, which rounds up. The small difference is invisible on screen, but it means the exact shape drifts very slightly at that width.
Can I use this for video, for print, or for a layout box?
The arithmetic is the same in all three cases, since a ratio is a ratio. What changes is the unit. For video the answer is pixels, for print you would treat the numbers as millimetres or inches, and for a layout you would read them as a width and a height. The page itself only ever talks about pixels.
Last verified: October 3, 2026
Launch Aspect Ratio Calculator
All Tools · All Tools · About · How We Test · Contact · Privacy
Maintained by Huang Bin · Last updated October 3, 2026