Skip to content
FluidClamp
Language: English

CSS clamp() from 16px to 20px

This calculator is prefilled for a size that scales from 16px (1rem) on small screens to 20px (1.25rem) on wide screens. Adjust any field to fine-tune it.

Input unit
Output unit

Common presets

Your clamp() value

clamp(1rem, 0.9167rem + 0.4167vw, 1.25rem)

Slope: 0.4167vw · Intercept: 0.9167rem

CSS
clamp(1rem, 0.9167rem + 0.4167vw, 1.25rem)
CSS custom property
--fluid-size: clamp(1rem, 0.9167rem + 0.4167vw, 1.25rem);
Tailwind class
text-[clamp(1rem,0.9167rem_+_0.4167vw,1.25rem)]

Max is 1.25× the min – within the 2.5× guideline for WCAG SC 1.4.4 Resize Text.

Rendered size by viewport
ViewportSize (px)Size (rem)
320px161
375px16.231.0143
768px17.871.1167
1024px18.931.1833
1280px201.25
1440px201.25
1920px201.25

Your settings are saved in the URL, so you can bookmark or share this exact result.

Live preview

18.93px at a 1024px viewport

Fluid type grows smoothly with the screen.

The clamp() value for 16–20px

With a viewport range of 320px to 1280px the result is clamp(1rem, 0.9167rem + 0.4167vw, 1.25rem). The size grows by 0.42px for every 100px of viewport width, reaching about 17.9px on a 768px tablet and 18.9px at 1024px, before it settles at 20px from 1280px upward.

The preferred value combines a fixed rem part with a vw part. The rem part keeps the text tied to the reader's browser font size; the vw part supplies the growth. Change the viewport fields above if your layout's container stops growing earlier or later.

When to use 16px to 20px

16 to 20px is a classic range for body copy on content sites. Phones keep the 16px browser default, while desktop readers get a larger size that matches longer line lengths. Blogs, documentation and long-form articles benefit most.

The maximum is 1.25× the minimum, within the 2.5× guideline often applied to WCAG 1.4.4 Resize Text, so browser zoom still enlarges this size predictably.

How the numbers are derived

Slope = (20 − 16) ÷ (1280 − 320) = 0.0042, which is 0.4167vw. Intercept = 16 − slope × 320 = 14.67px, or 0.9167rem with a 16px root font size. These two numbers form the middle argument of clamp(); the first and last arguments are your minimum and maximum converted to rem.

Using it in your project

Paste the value into a font-size declaration, store it in a custom property such as --fluid-size, or use the Tailwind class text-[clamp(1rem,0.9167rem_+_0.4167vw,1.25rem)]. If you need a whole set of related sizes, the type scale generator builds steps around a base size with the same viewport range.

Frequently asked questions

What is 16px in rem?

16px equals 1rem and 20px equals 1.25rem with a 16px root font size, the browser default. If your site uses a different root size, change the root font size field and the rem values update.

How big will the text be on a phone?

At a 375px phone viewport the value renders at about 16.2px. At 320px and below it stays at the 16px minimum.

Will it grow beyond 20px on large monitors?

No. From a 1280px viewport upward clamp() returns the maximum of 20px, so the size does not keep growing on 1920px or ultra-wide screens.

Can I use this value for padding or gap?

Yes. The math is identical for any CSS length. The fluid spacing calculator gives spacing-specific output such as p-[…] or gap-[…] Tailwind classes.