About this Fluid Type
Fluid typography allows font sizes to scale smoothly between a minimum and maximum value as the viewport width changes. This is achieved using the CSS `clamp()` function, which removes the need for multiple media queries.
Who this calculator is for
- Frontend developers building responsive type scales without maintaining multiple breakpoint overrides.
- Design-system teams turning fixed desktop/mobile specs into one fluid `clamp()` rule.
- Anyone modernizing typography so headings scale more gracefully across phones, tablets, and desktops.
When to use it
- Generate a `clamp()` value for hero headings, section titles, or body text that should resize smoothly.
- Translate a designer's min/max font specs and viewport breakpoints into production-ready CSS.
- Compare different viewport ranges before baking fluid type values into tokens or utility classes.
How to use this calculator
- Enter Min Viewport width (e.g., 320px).
- Enter Max Viewport width (e.g., 1200px).
- Enter Min Font Size.
- Enter Max Font Size.
- Copy the generated CSS Clamp code.
Key assumptions
- The output assumes a 16px root font size when converting the min, max, and intercept values into REM.
- Viewport widths and font sizes should describe a sensible increasing range for the fluid formula to be useful.
- The generated rule targets font sizing specifically, even though the same `clamp()` pattern can be adapted for spacing.
Accuracy and testing
Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.
How this calculator works
Inputs explained
Viewport Range
The screen width range over which the font size will actively scale. Below min width, font stays at min size. Above max width, it stays at max size.
Font Size Range
The smallest and largest sizes you want your text to be.
Understanding your results
Key Features
- Modern CSS Clamp
- REM output
- Smooth scaling