Form Designer Trying to auto calculate a field displayed on the form based on the difference between two previous fields entered by the user

I want a form to auto calculate “Amount due” field in the active form based on the grossAmount less creditAmount.

image