Updated
CSS clamp calculator explained
Create a clamp() expression from two size and viewport pairs. The middle term follows a straight line; the minimum and maximum cap the result outside the chosen range.
A worked example
16px at a 400px viewport and 32px at 1200px produce clamp(16px, 8px + 2vw, 32px). At an 800px viewport, the result is 24px.
Before you use the result
Generates a pixel-based rule rounded to six decimal places. Review text resizing and your layout at zoomed sizes; this arithmetic does not establish accessibility or a fit for every typeface.
Cite this page
ToolOctopus. “CSS clamp calculator.” Updated 2026-09-20. https://tooloctopus.com/css-clamp-calculator.
Add an access date if your instructions require one.
Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. Licence and source code.
