fluid typography calculator

Fluid Typography Calculator

Generate a responsive clamp() value for headings, body copy, and UI text.

Clamp output:
CSS snippet:
Slope -
Intercept -
Min breakpoint -
Max breakpoint -
Sphinx of black quartz, judge my vow. Fluid typography keeps this sentence readable at every screen size.

Font size at 768px: 20px

What is fluid typography?

Fluid typography is a responsive design technique that scales text smoothly between two viewport widths. Instead of jumping from one font size to another at media query breakpoints, your text grows (or shrinks) continuously. This creates a more polished reading experience and helps keep visual hierarchy stable across phones, tablets, laptops, and desktop monitors.

Today, the easiest way to implement this in CSS is with clamp(). You provide a minimum size, a flexible preferred size, and a maximum size. The browser then picks the ideal value in real time as the viewport changes.

How this calculator builds your CSS

The tool uses four core values:

  • Minimum font size
  • Maximum font size
  • Minimum viewport width
  • Maximum viewport width

From those, it calculates a linear equation that maps viewport width to font size. Then it wraps that equation in clamp() so the result never drops below your minimum size or exceeds your maximum size.

Equation summary

At a high level, the preferred value follows this pattern:

font-size = intercept + slope * viewportWidth

In CSS-friendly form, that becomes:

clamp(min-size, calc(slope*100vw + intercept), max-size)

This is exactly what the calculator outputs for you.

Why designers and developers use fluid type

  • Better readability: text scales naturally across devices.
  • Fewer media queries: cleaner, more maintainable stylesheets.
  • Smoother UI rhythm: headings and body copy stay proportional.
  • Performance-friendly: pure CSS, no JavaScript needed in production.

Recommended starting settings

Body text

  • Min font: 16px
  • Max font: 19px
  • Min viewport: 320px
  • Max viewport: 1200px

H1 heading

  • Min font: 30px
  • Max font: 56px
  • Min viewport: 360px
  • Max viewport: 1440px

Accessibility notes

Fluid type is powerful, but accessibility comes first. Keep your base text size readable (typically at least 16px), preserve sufficient line height, and ensure strong color contrast. If you output rem, users who increase browser default font size will benefit from proportional scaling.

Also avoid overly aggressive scaling ranges. A huge jump from tiny mobile text to very large desktop text can make content feel inconsistent and harder to scan.

Implementation example

Once you generate a clamp value, drop it directly into your CSS:

.post-title {
  font-size: clamp(1.875rem, calc(2.4vw + 0.9rem), 3.5rem);
  line-height: 1.15;
}

.post-body {
  font-size: clamp(1rem, calc(0.35vw + 0.93rem), 1.1875rem);
  line-height: 1.7;
}

Final tip

Use this calculator for a full type scale, not just one element. Generate values for headings, subheadings, paragraphs, and small text. When every level is fluid, your layout feels intentional from 320px all the way to ultrawide screens.

🔗 Related Calculators