Unit-To-Unit

Digital and print layout units

How px, rem, em, points, PPI and DPI work, and how to convert between screen and print.

Layouts that work on screens and in print depend on understanding a handful of units. Web design relies on flexible units such as pixels, rem and em, while print design uses fixed points and is defined by output resolution (DPI). This guide explains how each unit behaves and when to use it.

Web layout metrics: px, rem and em

Modern interface design uses CSS units that decide how type and spacing scale across viewport sizes and user accessibility settings.

1. Pixels (px): the fixed digital baseline

The CSS pixel is the basic unit of digital screens. It was once tied to a single hardware pixel, but it is now an abstract unit defined as 1/96 of an inch on a standard reference display. Pixels are not relative: an element set to 24px renders at 24px regardless of the default font size a user has chosen in their browser. (Browser zoom still scales it.)

When to use: borders, divider lines, decorative structural elements and fixed-size canvas components, where flexible scaling would break the design.

2. Rem (root em): the user-centric scale

The rem unit is relative to the font size of the root element (<html>). Almost all major browsers start with a root font size of 16px, so 1rem equals 16px by default. If a user raises the browser font size for accessibility, the root size updates and everything set in rem scales with it.

When to use: general typography, body copy, global margins, section padding and the main layout grid, so the page stays responsive and accessible.

3. Em: the contextual, inherited scale

Unlike rem, the em unit is relative to the font size of its parent element. If an element is set to 2em inside a container with an 18px font size, it works out to 36px. Em values compound down the page structure, so nested elements inherit and multiply the sizes.

When to use: only inside self-contained modules where padding, icon size or line height must stay in exact proportion to the current text size.

The core conversion blueprint

Fluid layouts need quick conversions between fixed pixels and relative units. This chart assumes the standard browser baseline of 1rem = 1em = 16px. The px to rem and rem to px converters handle any other value.

Pixels, rem and em at a 16px baseline
PixelsrememDesign context
12 px0.75 rem0.75 emCaptions and microcopy
14 px0.875 rem0.875 emSecondary body text
16 px1 rem1 emStandard root baseline
24 px1.5 rem1.5 emSub-headings (H3)
32 px2 rem2 emMain headings (H1)
48 px3 rem3 emHero title typography

Bridging screen and print: pixels to points

When screen work moves into desktop publishing, the pixel gives way to the point (pt). A point is an absolute physical unit, fixed by the PostScript standard as exactly 1/72 of an inch.

Converting means reconciling 72 points per inch with the 96 pixels per inch of the CSS standard, which gives a fixed scaling factor:

Points = pixels × (72 ÷ 96) = pixels × 0.75

To go from print back to web, invert the scale:

Pixels = points × (96 ÷ 72) = points × 1.333

Common sizes
PixelsPoints
12 px9 pt
16 px12 pt
24 px18 pt
32 px24 pt
48 px36 pt

Use the px to pt and pt to px converters for other values.

Print physics: DPI and PPI

A common cause of layout distortion is mixing up PPI (pixels per inch) and DPI (dots per inch). They describe different parts of the process.

To keep a printed image from looking pixelated or blurry, the industry standard for crisp reproduction is 300 PPI at print size.

Pixels needed = print size (inches) × 300

An image printed at 4 inches by 6 inches therefore needs at least 1200 by 1800 pixels. The same rule gives the pixel sizes for other common prints:

Pixels needed at 300 PPI
Print sizePixels
4 × 6 in1200 × 1800
5 × 7 in1500 × 2100
8 × 10 in2400 × 3000
US Letter (8.5 × 11 in)2550 × 3300
A4 (210 × 297 mm)2480 × 3508

The px to inches and px to mm converters give physical sizes, but they assume 96 pixels per inch, so use the 300 PPI rule above when planning print resolution.