How to create a budget remaining field

How to create a budget remaining field

Hi all,

    I am trying to figure out a way to display a field that takes a total budget figure and subtracts it by all the associated records with that specific tag to have a remaining budget figure in the budget form.

Budget Form: This form is where the total budget figure is entered.
Fields: 
-Budget
-Field A (look up field category)
-Goal is to have remaining budget field here as Budget - all the records in form 2 with the same category.

Form 2: This is where all the associated records that would subtract from the budget live
-Amount
-Field A (look up field category)

Thanks in advance for any help on this!