“What is the other dimension if I want my image to be X wide at this aspect ratio?” is the most common piece of image math in web, video, and print work. This calculator solves it in both directions. Enter any three of source width, source height, target width, and target height, leave one blank, and the fourth is computed so the two rectangles have the same aspect ratio.
Use the preset buttons to quickly fill the source pair with a standard ratio — 16:9 for HD video, 4:3 for classic TV and iPad, 1:1 for social media posts, 21:9 for ultrawide monitors, 9:16 for Instagram Stories and TikTok, 3:2 for DSLR and mirrorless photos, 2:3 for portrait crops. From there just enter one target dimension and read off the other.
The math
If two rectangles share an aspect ratio, then:
Rearranged, any one of the four can be solved from the other three:
(Only one solve is needed per call — the calculator picks whichever field you left blank and uses the appropriate rearrangement.)
Example: fitting an image into a 1200 wide slot
You have a 4032 by 3024 photo (the 4:3 native sensor of most smartphones). Your web layout has a 1200 pixel wide image slot. What height should the image be to preserve the aspect ratio?
Enter 4032 as width 1, 3024 as height 1, 1200 as width 2, leave height 2 blank. The answer is 900 — your 1200-wide image needs to be 900 pixels tall. Scale factor 0.2976, a comfortable downscale that will look sharp.
Example: figuring out a source size from a target
Working the other way: you know the target size (say, 1920 by 1080 for a hero banner) and you know the source photo is 3:2 native. What source pixel dimensions do you need?
Enter 3 as width 1, 2 as height 1, 1920 as width 2, leave height 2 blank. Wait — that gives you height 2 = 1280, not 1080. What does that mean? It means a pure 3:2 image cannot match 16:9 (1920 by 1080) without distortion. You have two choices: crop the 3:2 source to 16:9 (losing pixels on one axis), or letterbox the 3:2 source inside the 16:9 slot (adding bars on the other axis). The tool will tell you the dimensions; it cannot tell you which compromise to make.
Example: solving for the source ratio
Sometimes you know the target dimensions but not the source ratio. You have an image slot that must be 1440 by 540 pixels — what aspect ratio is that? Enter 1440 as width 2, 540 as height 2, and enter any width 1 you like (say, 8). The height 1 comes out to 3, meaning 8:3 — but the tool’s simplified ratio also shows you the lowest-terms form, which for 1440:540 is 8:3. The ratio field is the shortcut for this question.
Common ratios and where they come from
- 16:9 (1.778) — HDTV, YouTube, modern video. The standard most content is produced in.
- 4:3 (1.333) — Legacy television, iPad apps, older photos. Feels slightly square compared to 16:9.
- 1:1 (1.000) — Instagram feed posts, album artwork, profile photos. The safest “looks the same everywhere” format.
- 21:9 (approximately 2.333) — Ultrawide monitors, some cinematic video (CinemaScope is actually 2.39:1, close but not identical).
- 9:16 (0.5625) — Instagram Stories, TikTok, Reels, YouTube Shorts. The dominant mobile-video format.
- 3:2 (1.500) — DSLR and mirrorless sensors (24x36mm film too). Photographers’ default.
- 2:3 (0.667) — Portrait-orientation 3:2, used for printed photo books and some book covers.
The calculator handles all of these and any custom ratio you type in. The presets are there for convenience, not as hard constraints.
What this tool does not do
It does not crop, letterbox, or resize actual image files — it only computes the dimensions. For pixel-level operations you want an image editor or a canvas-based tool. For the specific case of “resize this image while preserving its aspect ratio”, the image dimension calculator is the one-step shortcut. And when you need the answer in inches for print, the DPI calculator ties pixels, physical size, and resolution together.