Fluid Type Calculator

A font size that scales between two viewports, then stops.


The preferred size is a line between your minimum at the small viewport and your maximum at the large viewport. clamp() holds the size at the minimum below that range and at the maximum above it. The preview width slider shows the size at a chosen viewport without resizing the window.

Frequently asked questions

Why rem instead of px in the output?

Rem follows the user font-size setting. The slope is still based on the pixel sizes you entered, divided by a 16px root.

What if the viewports are equal?

The slope would be a division by zero. Keep the large viewport wider than the small one.