Measure progress the way the contract says
Your contract sets how progress is measured (by stage, by percentage or by a schedule of values), what retainage applies and when it is released. Bill against that, and show the contract summary on every progress invoice so the client can check it. Progress invoicing explained walks through a full example, and the retainage calculator keeps the retention total straight across many periods.
This calculator does the arithmetic only.