Responsive Type Calculator

What Is Responsive Typography?

Responsive typography automatically scales font sizes between a minimum and maximum value based on the viewport width. Instead of setting fixed font sizes that are too small on mobile or too large on desktop, responsive type fluidly adapts to every screen size using CSS clamp() functions and viewport units.

This calculator generates the exact CSS clamp() values you need. Define your minimum font size (for mobile), maximum font size (for desktop), and the viewport range over which scaling should occur. The tool outputs production-ready CSS that smoothly interpolates between your bounds — no media queries, no JavaScript, no breakpoint jumps.

How to Use This Tool

  1. Set your minimum font size — This is the smallest the text should ever be — typically the size you want on mobile screens (320–375px wide). Common values: 16px for body text, 24px for headings.
  2. Set your maximum font size — This is the largest the text should be — the size on wide desktop screens (1200–1440px). Common values: 18–20px for body, 48–64px for hero headings.
  3. Define the viewport range — Set the minimum viewport width (usually 320–400px) and maximum viewport width (usually 1200–1440px) over which the scaling occurs.
  4. Copy the CSS clamp() output — The tool generates a CSS clamp() function that you paste directly into your stylesheet. It handles all the math — preferred value, viewport units, and clamping bounds.

Worked example: the default scale, measured, and what browser zoom does to it

With the defaults (body 16 → 20 px from a 320 to a 1440 px viewport, ratio 1.25, six steps), the tool writes --font-base: clamp(1.000rem, 0.9286rem + 0.3571vw, 1.250rem), plus five more steps. We applied all six in Chromium 141 on October 12, 2026 at four viewport widths and read the computed sizes:

Step320 px576 px720 px1440 px
xs10.2410.8311.1512.80
sm12.8013.5313.9416.00
base16.0016.9117.4320.00
lg20.0021.1421.7924.99
xl25.0026.4327.2331.25
2xl31.2533.0434.0439.06

Two things to check before you ship a scale.

The bottom steps can get very small. The ratio is applied below the base too, so xs comes out at 10.24 px on a phone. WCAG doesn't set a minimum font size (there's no "16 px rule"), but 10 px is small enough that you may want to raise the minimum base or use fewer steps below it.

Zoom grows fluid text less than you'd expect. Browser zoom shrinks the viewport in CSS pixels, so the vw part of the formula gets smaller as you zoom in. On a 1440 px window, 200% zoom puts the layout at 720 CSS px. Every step then renders at 2 × its 720 px size, which is 1.74 times its 100% size rather than 2 times. You need about 250% zoom to reach double size (2.11× measured). WCAG 2.2's success criterion 1.4.4 (Resize Text) asks that text can be resized up to 200%. Browsers zoom well beyond 250%, so this scale can still get there. A steeper range (a bigger gap between minimum and maximum) pushes the zoom needed higher, though. Keep the gap modest, and test the result with browser zoom at 200%.

Keep the unit on rem, the default, rather than px. Rem-based minimums and maximums grow when a reader raises their browser's default font size, and px values ignore that setting. clamp() itself is supported in Chrome and Edge 79, Firefox 75 and Safari 13.1, according to MDN's compatibility data. The tool outputs no fallback, which isn't needed in current browsers.

Related tools

Frequently Asked Questions

What is CSS clamp()?+
clamp(min, preferred, max) is a CSS function that constrains a value between a lower and upper bound. For typography, it sets a minimum font size, a fluid preferred value using viewport units, and a maximum font size — all in one line of CSS.
Do I still need media queries for font sizes?+
No. A well-configured clamp() function eliminates the need for media queries on font sizes. The text scales smoothly across all viewport widths without breakpoint jumps.
What browser support does clamp() have?+
clamp() is supported in Chrome and Edge 79+, Firefox 75+ and Safari 13.1+ (iOS 13.4+), according to MDN's compatibility data. The tool does not output a fallback value; current browsers do not need one.
How do I choose the right viewport range?+
Use 320px as the minimum (smallest common phone) and 1200–1440px as the maximum (standard desktop). The text will stop growing beyond the max and never shrink below the min.
Can I use rem instead of px?+
Yes. The tool supports both px and rem units. Rem is generally preferred for accessibility because it respects the user's browser font size setting.
What is a good font size ratio between heading levels?+
A ratio of 1.25 (Major Third) to 1.333 (Perfect Fourth) between heading levels produces a readable, visually balanced hierarchy. Our Typography Scale Generator can calculate this for you.
When should I use a fluid type scale versus fixed breakpoint sizes?+
Fluid scales (using clamp or calc with viewport units) work well for content sites where text should scale smoothly with viewport width. Fixed breakpoint sizes work better for design-system-driven UI where each breakpoint has a specific design treatment and you want type to lock into chosen sizes rather than interpolate. Many production design systems use both: fluid scaling within a breakpoint, with breakpoint changes triggering a different scale step.
What is a typographic scale ratio and which one should I pick?+
A type scale is a sequence of font sizes where each step is the previous step multiplied by a fixed ratio. Common ratios: 1.125 (major second, subtle steps for long-form content), 1.25 (major third, balanced for most sites), 1.333 (perfect fourth, more dramatic), 1.5 (perfect fifth, used for editorial), 1.618 (golden ratio, very dramatic). The calculator shows live previews of each ratio so you can pick by eye rather than by theory.

📖 Learn More

Related Article How to Build a Typography Scale → Related Article Font Pairing Guide for Web Designers →

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service