**sisters7**I used calculation wizard: amount due = total - max $ paid by MSC. However sometimes this formula creates negative number. So I added a conditional logic, if amount due is less than zero, than insert zero to the field of amount due. (I simply don't want negative amount as the amount due.)

Now the amount due always shows zero.

Please help. Thanks.

- JotForm Support
**liyam**Hello,

Can you tell us which condition that you have added which causes the result to go zero instead of a negative number? I also noticed that while you have some conditions that run in formulas, others just print the value into the field. Is this how it really should go? Or should this add up somewhere together with the other values that were added from other field values? This may be the one that's causing your form's calculation to result into an error.

It would be best if you can share with us the idea behind your form, perhaps we can assist you on how it should function.

We'll look forward to your response.

Thanks.

**sisters7**If I selected "Delegate" of Entitled III, and decided to stay Haworth Inn single occupancy for June 1 and June 2 and eat all meals from Project Dinner, Thursday to Saturday breakfast. The total would be $403.40. However MSC only pays dorm double occupancy rate of $39.50 a night. Therfore a fixed number, $159.00, is entered as the max. $ paid by MSC. If you use this as an example, you will see that the amount due is blank. The math formula I set up, Total - max. $ paid by MSC is not working.

There are conditions (such as Entitled I, State Officer) I entered formulas as the max $ paid by MSC simply because these conditions MSC will paid the formula amounts.

Thanks again.

- JotForm Support
**BDAVID**In order to fix this, please try the following:

1) Add a second "

**Form Calculation**" widget, and rename it to "**Amount Due $**".2) Rename the original "Amount Due $" field to something else, like "

**Total amount**".3) Hide the "

**Total amount**" field.4) Modify the condition you created to "If

**Total amount**is less than**zero**, then insert**zero**into**Amount Due $**".5) Create a second condition to pass "

**Total amount**" if it's value is greater than zero to "**Amount due $**" field:You can try my cloned version here: https://www.jotformpro.com/form/63454075087965?

Let us know if you need more help.