Responsive clamp builder calculator

Linear interpolation in viewport width, clamped at the chosen endpoints.

Your inputs

Use the units shown.

CSS expression
clamp(16px, calc(13.333333px + 0.833333vw), 24px)

Your calculation
How is this calculated?

Linear interpolation in viewport width, clamped at the chosen endpoints.

Try an example

Worked example

CSS expression: clamp(16px, calc(13.333333px + 0.833333vw), 24px)

Inputs
  • Minimum size (px): 16
  • Maximum size (px): 24
  • Minimum viewport (px): 320
  • Maximum viewport (px): 1280

Compare inputs

CSS expression: clamp(10px, calc(0px + 2vw), 20px)

Inputs
  • Minimum size (px): 10
  • Maximum size (px): 20
  • Minimum viewport (px): 500
  • Maximum viewport (px): 1000
Share this page
Share this calculator

Leave unchecked to share the page without your entered values.