clamp() Calculator

Handy little tool for calculating viewport-based clamped values.

How does this work?

X = (fontSizeMax - fontSizeMin) / (viewportWidthMax - viewportWidthMin)

Y = fontSizeMax - viewportWidthMax * X
Z = X * 100

Result = clamp(fontSizeMin, Yrem + Zvw, fontSizeMax)

Check out clamp() on MDN.