I frequently need a tool to calculate how many days from a date to another, for example from 27 April 2016 to 18 July 2016.

Are there tools for Windows or for OS X?

2 Answers 2


On OS-X you already have python installed and on windows it is easily installed so you can simply do it on the command line, from your example:

>python -c"import datetime as dt;d=dt.date(2016,7,18) - dt.date(2016,4,27);print d.days"

You can even get time involved, e.g.:

>python -c"import datetime as dt;d=dt.datetime(2016,7,18,16,30) - dt.datetime(2016,4,27,20,43);print d"
81 days, 19:47:00

If you are using python 3 you need to make the prints functions. Obviously you can put things into python scripts for more power and flexibility.

See the online manuals for more details.


http://www.timeanddate.com/date/duration.html has a nice UI, friendly and useful but it requires internet connectivity..

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.