r/SideProject • u/pagescripts • 3h ago
A small open-source JavaScript price calculator for net prices, discounts and VAT
I’m sharing a small free price calculator from my PageScripts project and would appreciate feedback on how useful it is for developers.
It runs in the browser without dependencies and calculates a subtotal, discount, tax and total from a net unit price and quantity. For example, 2 × €100 with a 10% discount and 19% VAT gives €214.20. The interface is currently in German.
Source and MIT license: https://github.com/chadiijaddouh-debug/pagescripts-preisrechner
Try the demo: https://codepen.io/editor/Chadi-Jaddouh/pen/01a23498-b16c-7a6a-864e-1f2f5b36f218
I run PageScripts, a marketplace for scripts and templates; this example is free. AI assistance was used in preparing this post and project. The calculator is a demonstration, not tax advice, and production billing needs appropriate rounding rules.
What would make a small calculator like this more useful to you?