calculate payments for quarter