Easy way is to only withdraw your profits and interest on a regular basis, keeping your average balance similar to what you started. Harder and more accurate way is taking daily return on capital and adding it up for the year. You can also develop a formula where each time you withdraw, add up number of days between withdrawals and divide it by number of trading days in year. This will give you fraction which you will multiply by the quotient of your earnings or losses divided by your balance. Continue to add this formula for each withdrawal for the year. (I normally withdraw only once a month at beginning of the month to make it easier, and to show me how I did each month.)