Pro-Rata Payment (Proportional Payments)

Hello, I was hoping someone could show me how I could charge money based on how many days left in the month there are. For instance, if there are 30 days in a month, and it is the 15th the user will pay 50% of what is left.

Any help would be appreciated thank you!