The formula that can be used to best express the monthly ending balance would be R = I - E
R represents the rest you have, I represents all of your monthly income together with the income you have had before and E represents all the expenses you have had during the month.