Ratios in Graphic, Web, & UI Design
Every time you resize a photo, pick a video format, or set heading sizes, you're working with a ratio. Here's the math designers use every day, with numbers you can check.
1. Aspect ratios: width to height
An aspect ratio describes a shape, not a size. A 1920 × 1080 screen and a 1280 × 720 screen are both 16 : 9, because both pairs of numbers simplify to the same ratio. Keep the ratio and the image keeps its shape. Change it and the image either stretches or gets cropped.
| Ratio | Common sizes | Where it's used |
|---|---|---|
| 16 : 9 | 1920 × 1080, 3840 × 2160 | TV, YouTube, most monitors and laptops |
| 9 : 16 | 1080 × 1920 | Vertical video: Reels, Shorts, TikTok, Stories |
| 4 : 5 | 1080 × 1350 | Portrait posts in social feeds |
| 1 : 1 | 1080 × 1080 | Square posts, profile pictures, product photos |
| 3 : 2 | 6000 × 4000, 6 × 4 in prints | Most DSLR and mirrorless camera sensors |
| 4 : 3 | 1024 × 768, 2048 × 1536 | Older TVs, many tablets, phone camera photos |
Platforms change their recommended sizes from time to time, so check the current guidance before a big campaign. The ratios themselves don't change.
Resizing without stretching
Pick the new width, then scale the height by the same factor:
A 4000 × 3000 photo resized to 1200 px wide: 1200 × (3000 ÷ 4000) = 900 px tall. The Aspect Ratio Calculator does this both ways and also gives you the CSS.
Fitting one ratio inside another
When a 4 : 3 video plays on a 1920 × 1080 (16 : 9) screen without cropping, its height fills the screen (1080 px), so its width is 1080 × 4/3 = 1440 px. The leftover 1920 − 1440 = 480 px becomes black bars, 240 px on each side (pillarboxing). Going the other way, from a wide image into a taller frame, leaves bars above and below (letterboxing). The alternative is to crop, which in CSS is object-fit: cover.
2. Paper sizes that never change shape
A-series paper (A3, A4, A5) uses the ratio 1 : √2, about 1 : 1.414. That number was chosen for a neat reason: fold a sheet in half and the half has exactly the same shape as the original. A4 is 210 × 297 mm, and 297 ÷ 210 ≈ 1.414. Fold it and you get A5, 148 × 210 mm, with the same ratio.
That's why you can scale an A4 design to A3 or A5 on a photocopier (141% or 71%) without cropping anything. US Letter (8.5 × 11 in, about 1 : 1.29) doesn't have this property, which is why letter-size designs don't scale cleanly to tabloid.
3. Modular type scales
Instead of picking heading sizes by eye, many designers multiply a base size by a fixed ratio. Each step up is the previous size times the ratio.
| Level | Major third (× 1.25) | Perfect fourth (× 1.333) |
|---|---|---|
| Body | 16 px | 16 px |
| H4 | 20 px | 21.3 px |
| H3 | 25 px | 28.4 px |
| H2 | 31.3 px | 37.9 px |
| H1 | 39.1 px | 50.5 px |
A bigger ratio gives more dramatic contrast between headings and body text. Smaller ratios suit dense interfaces and small screens. In practice, designers round to whole pixels.
4. The golden ratio, honestly
The golden ratio, written φ (phi), is about 1 : 1.618. Its defining property is that if you split a line into a longer part a and a shorter part b, the whole compares to a exactly as a compares to b. The exact value is (1 + √5) ÷ 2.
It's closely tied to the Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21...). Divide each by the one before and the answers home in on φ: 8/5 = 1.6, 13/8 = 1.625, 21/13 ≈ 1.615.
Using it in a layout
To split a 960 px wide layout into a main column and sidebar in the golden ratio, divide by 1.618: 960 ÷ 1.618 ≈ 593 px for the main column, leaving 367 px for the sidebar. Check: 593 ÷ 367 ≈ 1.62.
A word of caution
You'll often read that the Parthenon, the Mona Lisa, or famous logos were designed around the golden ratio. Many of these claims don't hold up when people measure carefully, and the results depend heavily on where you choose to draw the lines. The golden ratio is a pleasant, useful proportion, and it's a fine starting point. It isn't a rule, and a 3 : 2 or 2 : 1 split is often just as good.
Try it yourself
- What's the height of a 16 : 9 video that's 1280 px wide?
- A 1080 × 1080 square image is shown in a 1080 × 1920 vertical frame without cropping. How tall are the bars above and below it?
- Simplify the screen resolution 2560 × 1600 to a ratio.
Show answers
- 720 px. 1280 × 9/16.
- 420 px each. 1920 − 1080 = 840 px of empty space, split in two.
- 16 : 10, which simplifies further to 8 : 5 (the GCF of 2560 and 1600 is 320).