The formula needs to work for any of the months. I need it for the purpose of calculating daily interest.

Any ideas are greatly appreciated!