Heres an example, although in angular, the idea is the same. You can just look on codepen for other vanilla js examples
https://codepen.io/sargbah84/pen/eZKQGWThey probably have a set value per mill, which updates based on the quantity the put inside the form.
There are other methods for doing more complex calculators, such as the ones boosting sites use for games like LoL, Dota, CSGO etc
If I can find the old one I created for a LoL site awhile ago, ill pm it to you
This post was edited by Strickland on Jul 1 2019 03:57am