They calculate the average daily balance by totaling the amount owed at the end of each day and dividing by 30 — the average number of days in a month or billing cycle. (growingfamilybenefits.com)
The «average daily balance» is determined by dividing the total by the total numbers of days in the month. (starloanservices.com)
So to get the proportion of the remainder of the month you do (days occurred in the month divided by number of days in the month): (money.stackexchange.com)