← All tools

CSS clamp() Calculator

Make font sizes and spacing scale smoothly between two screen widths. Set the min and max size, preview it at any width, and copy the clamp() value in rem or px.

Preview

900px

Fluid heading

47.8px at 900px wide

375px1440px

Code

font-size: clamp(2rem, 1.2958rem + 3.0047vw, 4rem);

Settings

Output unit

The size stays at the min below 375px, grows in a straight line, and stops at the max above 1440px. rem output respects the visitor's browser font size setting.