**simhc**I cant seem to find a way to create a formula that will calculate how many days left in the month. Â I want to use that number to calculate a prorated amount. Â thanks for your help.

- JotForm Support
**jonathan**I cannot find a function that gives the number of Days of a Month -- so you will need to either assume a fixed 30/31 days and calculate

ORÂ

Get first the Month's number of days (example: April is 30days) and just substract the current date (number of days up to date) -- this will give the remaining days of the month

I will try create a demo form you can check. I'll get back to you shortly.

Â

- JotForm Support
**jonathan**Please test my formÂ https://form.jotform.com/61081009373954

It work like this

Â

Hope this help. Let us know how it goes.

**simhc**Thanks for the quick responses and example form. Â Ideally I would like to have the end date calculated automatically. Â I played around with some temp forms and tried to set some conditions to do this. Â I tried to create a condition for each month...say if today is before May 1 or after Mar 30 then set the {end date} to 30 april and set the {number of days in the month} to 30. Â I could then use that info to subtract how many days are left in the month and do a calculation to find the percentage of the month remaining to determine a prorated charge. Â I cant seem to get that initial logic (calculating the end date) to work. any ideas? Â thx.

**simhc**Thanks so much randy. Â That is exactly what I wanted. Â I will play with it and see if I can get that to do what I need. Â Disregard my last message that was not meant for you. Â

- JotForm Support
**Mike**What a beautiful example! We appreciate your input, Randy.

**simhc**Randy, the form you created worked perfectly. Â It providesÂ all the information I need to do the prorated calculations. Â Thank you so much for taking your time to help me out. Â I had spent hours trying to get that to work. You even accounted for leap yearâ€¦Iâ€™m impressed! Â Thanks again to everyone that helped answer my question. Â