Skip to content
FluidClamp
Language: English

CSS clamp() from 32px to 64px

This calculator is prefilled for a size that scales from 32px (2rem) on small screens to 64px (4rem) on wide screens. Adjust any field to fine-tune it.

Input unit
Output unit

Common presets

Your clamp() value

clamp(2rem, 1.3333rem + 3.3333vw, 4rem)

Slope: 3.3333vw · Intercept: 1.3333rem

CSS
clamp(2rem, 1.3333rem + 3.3333vw, 4rem)
CSS custom property
--fluid-size: clamp(2rem, 1.3333rem + 3.3333vw, 4rem);
Tailwind class
text-[clamp(2rem,1.3333rem_+_3.3333vw,4rem)]

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

Rendered size by viewport
ViewportSize (px)Size (rem)
320px322
375px33.832.1146
768px46.932.9333
1024px55.473.4667
1280px644
1440px644
1920px644

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

Live preview

55.47px at a 1024px viewport

Fluid type grows smoothly with the screen.

The clamp() value for 32–64px

With a viewport range of 320px to 1280px the result is clamp(2rem, 1.3333rem + 3.3333vw, 4rem). The size grows by 3.33px for every 100px of viewport width, reaching about 46.9px on a 768px tablet and 55.5px at 1024px, before it settles at 64px 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 32px to 64px

32 to 64px suits page titles and h1 headings on marketing sites. A 32px heading is bold on a phone; at 64px it anchors a full-width desktop hero section.

The maximum is 2× 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 = (64 − 32) ÷ (1280 − 320) = 0.0333, which is 3.3333vw. Intercept = 32 − slope × 320 = 21.33px, or 1.3333rem 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(2rem,1.3333rem_+_3.3333vw,4rem)]. 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 32px in rem?

32px equals 2rem and 64px equals 4rem 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 33.8px. At 320px and below it stays at the 32px minimum.

Will it grow beyond 64px on large monitors?

No. From a 1280px viewport upward clamp() returns the maximum of 64px, 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.