Fluid Typography Calculator
About this tool
About Fluid Typography Calculator
Fixed font sizes force a choice between headings that are too large on phones and too small on wide monitors. Fluid typography solves this by letting each size grow continuously between two viewport widths. This calculator builds a complete fluid type scale. Set the base body size and the scale ratio you want on small screens, for example 16 px with a minor third (1.2), and on large screens, for example 20 px with a perfect fourth (1.333). Each step of the scale, from small print to the largest display heading, gets its own clamp() value, so headings grow faster than body text and the hierarchy gets stronger on big screens. Choose how many steps above and below the base you need, the viewport range and rem or px output. Drag the preview to any width to see every step at its real size, then copy CSS custom properties, a Tailwind v4 theme block or JSON. It all runs in your browser.
Built and maintained by Abhi JainUpdated
How to Build a Fluid Type Scale
- 1
Set the viewport range
Enter the Min viewport and Max viewport widths.
- 2
Choose base sizes and ratios
Enter the base size and ratio at each end, and the number of steps above and below the base.
- 3
Preview
Drag the preview slider to check every step at different screen widths.
- 4
Copy the scale
Copy the CSS variables, the Tailwind v4 theme or the JSON.
Fluid Typography Calculator: questions and answers
What is fluid typography?
Font sizes that scale smoothly with the viewport width, using CSS clamp() with a vw component, instead of jumping between fixed sizes at media-query breakpoints.
Why use a different ratio on large screens?
Small screens need a gentle ratio so headings fit. Wide screens have room for more contrast, so a larger ratio gives stronger hierarchy where it helps.
How is each step calculated?
Step n is base × ratio^n at each end. The two sizes are then joined with clamp(min, intercept + slope × 100vw, max), where slope = (max − min) ÷ (max viewport − min viewport).
Is fluid type accessible?
Yes, if the values use rem so they respect browser zoom and font settings. This calculator outputs rem by default. Keep body text at 16 px or more.
More CSS Clamp Generator presets
Related tools
- Type Scale GeneratorModular type scale with ratio presets, a live specimen and CSS or Tailwind output.
- PX to REM ConverterConvert px to rem and back, see a reference table and convert whole stylesheets.
- Spacing Scale GeneratorSpacing tokens on a 4 or 8-pt grid, t-shirt sizes or a ratio, as CSS variables or Tailwind.
- CSS Button GeneratorDesign a button with hover, active and focus states; get CSS, Tailwind and HTML.