I need help on building a calculator on my html website. I have the formula I would like just can't get it to work right.

I want it to be the following
Title"carbohydrates" "input box a times 2"
Title"calories" "input box b"
Title"protein" "input box c times 3"
Title"total" "total of a,b,c times 2.66"

there the formula that I want the calculator to perform