How is payment calculated?