You might have seen pricing pages with these range sliders that will allow you to calculate your spend based on your usage. You can use this snippet by Hornebom to recreate that on your web page. The price increase and decrease as you move the slider left or right.
If you are having trouble with the pen, try the archived copy on GitHub
Budget Slider Snippet
See the Pen budgetSlider by Hornebom (@Hornebom) on CodePen.0