Aspect Ratio Calculator

Enter the size you have, type the width or height you want, and the matching number appears with the ratio reduced beside it.

Type one dimension and the linked field solves the other as you go.

Reduced ratio, decimal value, and megapixel count update on every keystroke.

  • Names the standard ratio you matched.
  • Whole pixel size table you can reuse.
  • Copies a ready CSS aspect-ratio line.

How to calculate an aspect ratio

Three short steps take you from a pair of measurements to the exact size you need next.

  1. 1

    Enter what you already have

    Put the current width and height into the original size boxes. If you only know the proportion, choose it from the ratio list such as 16:9 or 4:5 and the boxes fill themselves.

  2. 2

    Type the dimension you need

    Enter either the new width or the new height. With the link switched on the other box solves itself instantly, and switching the link off lets you type both to compare a deliberate distortion.

  3. 3

    Take the answer with you

    Copy the finished size, copy the CSS aspect-ratio declaration for a stylesheet, or save the whole pixel table as a CSV so the numbers are still there tomorrow.

Linked width and height

One field drives the other while the link is on, which is how most sizing questions actually arrive, and the link toggles off when you need to break the proportion on purpose.

Ratio reduced and named

Dimensions are divided down to whole numbers and checked against the standard proportions, so 1920 by 1080 reads as 16:9 rather than a raw decimal you have to interpret.

Whole pixel size table

Seven common widths are listed with the height each one needs, snapped onto the ratio so a row like 1280 by 720 is exact rather than nearly right.

Shape drawn to scale

A proportion box redraws as you type, giving a quick visual check that the ratio you picked is landscape, portrait, or square before you commit to it.

Ready to paste values

Copy buttons hand you the finished pixel pair or a valid CSS aspect-ratio declaration, and a text or CSV download keeps the working out for a handover note.

Scale and megapixel read out

Alongside the answer you get the percentage of the original width and the megapixel count, which is often what decides whether a size is worth exporting at all.

How the calculation is handled

This page is arithmetic and nothing more, so it is worth being clear about what happens to the dimensions you type and what is kept afterwards.

Processing Browser

Each proportion is solved by arithmetic running in this browser tab as you type, with no request sent anywhere and no calculation queued on a machine you do not control.

Storage None

Typed dimensions live in the page only. Reloading clears them, and nothing is written to an account, a cookie, or a saved history list.

Aspect Ratio Calculator account access

Open the page and start typing. There is no sign-in wall, no usage counter, and no limit on how many proportions you solve.

Reading the ratio numbers correctly

Small details that separate a proportion that holds up in production from one that quietly drifts.

Privacy

Nothing you type is sent anywhere, so internal spec numbers stay on this machine.

No account, cookie, or saved history records the dimensions you tried out here.

Input Quality

Use the true pixel dimensions rather than a rounded figure from a spec sheet.

Odd source sizes rarely reduce to a tidy ratio, which the decimal reading makes obvious.

Output

Results are rounded to whole pixels because part of a pixel cannot be exported.

A near match is flagged as close rather than exact, so read that label carefully.

Limits

Aspect Ratio Calculator takes typed numbers only, so there is no upload and no file size ceiling to worry about.

Aspect Ratio Calculator questions

How do I calculate aspect ratio from width and height?

Divide both numbers by their greatest common divisor. Entering 1920 and 1080 does that for you and returns 16:9, along with the decimal 1.7778 for anywhere that wants a single figure.

What height do I need for a 1280 pixel wide 16:9 image?

720 pixels. Choose 16:9 in the ratio list, type 1280 into the new width box, and the linked height solves itself while the size table below confirms the pair.

Why does my size say close to 16:9 instead of 16:9?

Because the numbers are near the standard but not on it, usually after an earlier crop rounded a pixel. Round to the nearest listed size in the table to land on the ratio exactly.

Can I use this for screens and video, not just photos?

Yes. Displays, video frames, print areas, and CSS containers all use the same proportion arithmetic, and the copy button hands over an aspect-ratio declaration a stylesheet accepts as written.

How do I keep the proportion while changing only one side?

Leave the link switched on and edit a single field. The other side recalculates from the original proportion, so the shape stays identical while the pixel count changes.

4.1 (342 ratings)