How it works
Interest = overdue amount x annual rate x days late / 365. It is simple interest, not compounded.
The rate is whatever your invoice terms or contract say. State the rate on the invoice up front so the customer agreed to it before the work was done.