I need to update a field based off date. What I want to do is have a hidden date field that would then add to another field to give me a number based off the date. I did this in excel with this formala:

=(TODAY()-A4)+B4

In A4 I have my date entered. In b4 I have the number I want to add to the date. The answer is then displayed in whatever cell I put this formula in. I need to do the same thing in HTML. Any help appreciated.