Skip to content

Fluid Typography Calculator: CSS clamp() Font Sizes

Calculate fluid font sizes with CSS clamp(): set a minimum and maximum size and screen width, preview it live and generate a complete fluid type scale.

Result

Live preview

The quick brown fox jumps over the lazy dog.

Fluid type scale

StepMinMaxclamp()

How to use the Fluid Typography Calculator

  1. Enter the smallest and largest screen width the size should scale between, for example 360 px and 1280 px.
  2. Enter the font size you want at each end.
  3. Copy the clamp() value. Drag the viewport slider to see the size at any screen width.
  4. For a whole system, pick two ratios and copy the type scale as CSS variables.

Tips

  • Output in rem so the text still grows when visitors change their browser font size.
  • Body text rarely needs to grow much; headings benefit most from fluid sizes.
  • A larger ratio on big screens and a smaller one on phones keeps headings dramatic on desktop and readable on mobile.

Converting between units? The PX to REM converter handles lists of values.

Everything runs in your browser: nothing you type or paste is sent to a server.

More CSS tools