What did that project really pay?
The quoted rate is the number you remember. The effective rate is what survived after the unpaid changes.
Recover it next time
Price the request while it is still a request.
The easiest money to protect is the work you have not started yet. First check whether your contract gives you the right to charge for it.
Two different losses, kept separate.
Work you were not paid for values extra hours at your rate. Margin impact values those hours at their implied cost from the margin you expected.
Margin is reported in percentage points. The calculator avoids costing the same hours twice or inflating the loss to make a better headline.