Is there code that let's a user know how many days they have left in their subscription period?

I would like to show user both the number of days they have left in their subscription period. I also want to show how many blogs they have left to create. I have all of the settings in place with the access levels and subscriptions, just need to show this in my page template.