Explanation:
1 $3100 $31 $3131
2 $3131 $31.31 $3162.31
3 $3162.31 $31.62 $3193.93
4 $3193.93 $31.94 $3225.87
5 $3225.87 $32.26 $3258.13
you only need to calculate 1% of every monthly starting balance and add that then to the starting balance to create the ending balance of the old month, which is then the starting balance of the new month.
1% is simply 100%/100, so the starting balance divided by 100.