Calculadora de Dias entre Datas
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
dias = |data_fim − data_inicio| em ms / 86400000; semanas = floor(dias/7)
About this calculator
The Days Between Dates Calculator is an online tool that quickly finds the time interval between two dates. You enter the start and end dates, and the system calculates the difference in days, weeks, and months. The calculation converts the date difference into milliseconds and divides by the number of milliseconds in a day (86400000). Weeks are obtained by dividing days by 7 and rounding down.
This calculator is useful in many everyday situations. For example, to find out how many days remain until an important event like a wedding or trip. It can also be used to calculate project deadlines, vacation periods, or the exact age in days of a baby. It's a simple tool that avoids manual errors and provides instant accurate results.
When using the calculator, make sure to enter dates correctly, respecting the required format (usually dd/mm/yyyy). Note that the calculation considers the exact difference between dates, without including the start or end day depending on interpretation. For contractual or legal deadlines, consult a professional to ensure the calculation meets specific rules.
Frequently asked questions
How does the calculator handle leap years?
The calculator automatically accounts for leap years because it uses the millisecond difference between dates, which correctly includes the extra day (February 29).
Is the start date included in the calculation?
No, the calculator counts the exact difference between dates, excluding the start day. For example, from 01/01 to 02/01 results in 1 day.
Can I calculate future or past periods?
Yes, the tool works for both future and past dates. Just enter the two dates you want.
What date format should I use?
The standard format is dd/mm/yyyy (day/month/year). Check that the field accepts only numbers and slashes.
Is the month result exact?
The month calculation is approximate, based on an average of 30.44 days per month. For precise months, consult a calendar.