font-size: clamp(16px, 13.3333px + 0.8333vw, 24px);
Use the inputs above for your own values. The result follows the method and assumptions shown below.
How it works
Find the line through the two viewport/font-size points; slope×100 gives the vw coefficient and the intercept gives the px term. Wrap in clamp(min,preferred,max).
Input definitions
- Minimum font size (px)
- Enter the value in the labeled unit.
- Maximum font size (px)
- Enter the value in the labeled unit.
- Minimum viewport width (px)
- Enter the value in the labeled unit.
- Maximum viewport width (px)
- Enter the value in the labeled unit.
A worked example
- Minimum font size (px)
- 16
- Maximum font size (px)
- 24
- Minimum viewport width (px)
- 320
- Maximum viewport width (px)
- 1280
Assumptions & limits
Viewport-based interpolation in CSS pixels. The generated rule is plain text; test accessibility and layout in the destination site.
Sources & review
Maintained by AnsRio. Methods and examples are reviewed against the stated formula; this is not professional certification.
Method updated 2026-11-18. Reviewed against the stated method and example. Our verification approach.
Report an issue with this tool or suggest an improvement ↗
Common questions
Will the generated font size keep growing on large screens?
No. The preferred linear size is constrained by the minimum and maximum values in clamp(). Test text zoom and reflow; pixel endpoints do not replace accessibility checks.
Does generated CSS or a color result guarantee an accessible design?
No. Test the result in its real layout, including text contrast, browser zoom, focus and responsive behavior. A code generator only covers its documented property or color operation.
How does the Fluid font-size CSS clamp generator tool work?
Find the line through the two viewport/font-size points; slope×100 gives the vw coefficient and the intercept gives the px term. Wrap in clamp(min,preferred,max).
What are the assumptions and limits of Fluid font-size CSS clamp generator?
Viewport-based interpolation in CSS pixels. The generated rule is plain text; test accessibility and layout in the destination site.