Several years ago, I loaned money to a family member. They borrowed different amounts at irregular intervals. They are now beginning to repay, so I want to establish exactly how much they owe. I have a spreadsheet that has a row for each time they borrowed or repaid an amount. We agreed upon an interest rate. How can I calculate how much they owe at any time?
Thus far I wrote a script (couldn't figure out how to do it in Excel) to take the existing spreadsheet and make a new one that has columns for date, cumulative amount loaned, interest, and amount owed. It has a row for each day from the date of the first loan to today. This assumes that payments go entirely against principal, which I'm pretty sure is not typical, but I'm not sure how else to do it. Is there an easier way to do this, a web app perhaps? I want a fair solution for both parties.
EDIT: Figured out how to do it in Excel, so I posted my spreadsheet on Google Drive here (note the two tabs). Is this calculation fair?