It is often required to make an online form that can calculate the totals. Here is a simple HTML calculation form It is structured like an invoice form so that you can copy and adapt. Note that “simple” is meant to be taken as easy to understand. So I have avoided any temptation to make the smallest code. Also, the code uses some jQuery to do the calculation Here is a sample calculation form.