HTML Code for Mortgage Calculator Table

I am trying to create a custom section of the lead form. I want it to display a breakdown of a mortgage payment within the lead (CRM). I need it as a table so it needs to have 4 headers [Parameters, Frequency, Value, Monthly].

In the First Mortgage and Other Financing, I need to create a formula that will calculate a mortgage payment (loan amount, interest rate, and loan term are defined in other fields of the lead)

The other fields will be calculated by taking the monthly amount and dividing it by 12 if the frequency is annually. If its monthly, it will just take that amount.

For MI, it will be calculated by taking the loan amount (defined in another field within the lead form) X Value and then divide by 12.

So anytime these fields are updated or edited, the table calculation should also be updated.