Toolivaro

Calculadora de diferencia entre fechas gratis

Calcula el número exacto de días, semanas, meses y años entre dos fechas, con un único método fiable.

La calculadora de diferencia entre fechas devuelve cuánto tiempo hay entre dos fechas, expresado de todas las formas útiles a la vez: días de calendario totales, semanas completas más los días restantes, meses completos y años completos. El método es deliberadamente sencillo y está explicado en la página: la diferencia se mide en días de calendario entre las dos fechas (el día inicial no se cuenta; el día final se incluye cuando es un día completo), y las unidades mayores se derivan de ese recuento de días con las aproximaciones estándar: un mes promedia 30,44 días y un año promedia 365,25 días. Como todas las unidades derivan de un único recuento de días, los resultados siempre coinciden entre sí — la propiedad que de verdad se necesita al planificar: que un plazo sea «2 semanas» u «14 días» nunca debería depender de qué herramienta usaste. La calculadora es independiente de las zonas horarias: compara fechas de calendario, no instantes, así que los cambios de hora no pueden alterar el resultado. Todo se ejecuta localmente en tu navegador: tus fechas nunca salen de tu dispositivo y nunca se registran. Usa esta calculadora para periodos de contrato, ventanas de reserva, duración de proyectos y cualquier planificación que necesite un recuento de días defendible.

Se procesa localmente en tu navegador

Cómo usar esta calculadora

What this calculator is for, and when to use the business-days tool instead

The date difference calculator tells you exactly how much time sits between two dates, in every unit you might need on one screen: total calendar days, whole weeks plus remaining days, whole months, and whole years. It is the tool to reach for when a number must be defensible: a contract period, a notice window, a rental agreement, a booking window, a project duration, or a countdown where someone will ask how you counted. Because the day count is exact and the larger units derive from that same count, all four answers agree with each other, which matters more than it sounds: a deadline described as two weeks should always equal fourteen days, no matter which page you used. The calculation runs entirely in your browser, and your dates are never uploaded, logged, or stored. Use it whenever the number will go into writing, an email, or a contract, because written numbers are the ones that get argued over.

The calculator counts calendar days: every midnight boundary between the two dates is one day, and weekends and holidays are included, because a week of a rental or a contract is seven calendar days, not five. If your question is about working days, how many business days until a payment lands or a review is due, that is the job of the business-days calculator, which skips weekends and holidays. This tool also does not measure age in the birthday sense, and it works with dates only, not times of day. What it does guarantee is a single, stated, repeatable method: the same two dates always return the same numbers, anywhere on Earth, in any time zone, which is exactly what you want when the number has to survive an argument. Two people counting the same span with the same method will never disagree, and that consistency is the point of using a calculator at all.

Choosing the two dates and getting the counting convention right

The two fields are Start date and End date, standard date pickers that also accept typed dates in YYYY-MM-DD form. The order does not matter: the calculator takes the absolute difference, so entering the later date first returns the same result, which is handy when you realize you typed them backward. The counting convention is stated on the page: the start day is not counted, and the end day is counted when it is a full day. In practice that means January 1 to January 2 is 1 day, January 1 to January 1 is 0 days, and a booking that starts March 1 and ends March 31 spans 30 days. If your contract, lease, or school counts both endpoints, treating the start date itself as day one, add one day to whatever this tool returns, and write that convention down so nobody re-counts differently later. A recorded convention beats a remembered one, especially in shared documents.

Two pitfalls trip people up. First, mixing counting conventions mid-plan: if one document uses midnight counting and another counts both endpoints, the same period will disagree by a day, so pick one convention and apply it everywhere. Second, expecting weekends and holidays to disappear: because these are calendar days, a two-week window always includes two weekends, and that is correct for rental and contract math even though it feels wrong for work planning. Time zones cannot shift the result, because the calculator compares calendar dates, not instants: a daylight-saving change in between does not add or remove a day. And this tool only measures the gap between two dates you already have; if you need the date that falls 45 days from today, that is a different calculation entirely. Reversed inputs are the third pitfall that is not one: the result is identical, so there is nothing to fix.

Reading the results: days, weeks, months, and years

The results panel gives you four lines that all tell the same story in different granularities. Total days is the exact calendar-day count, the number to quote in a contract or a dispute. Weeks and days splits that count into whole 7-day blocks and the remainder: 90 days becomes 12 weeks and 6 days, and the pair always reconciles back to the total, which is a quick sanity check. Months and years are derived from the same day count using the standard averages: 30.44 days per month and 365.25 days per year, the latter already accounting for leap years. Both are rounded down to whole units, so 45 days shows as 1 month, not 1.48, and 396 days shows as 1 year even though it contains about thirteen months. The four lines are deliberately consistent, and any two of them that disagree mean you are looking at a different calculation. That is the design working: one exact count, four ways of saying it.

Read the months and years lines as summaries, not calendar-aware facts: 2 months between January 15 and April 15 does not mean two full calendar months by their actual lengths, it means 90 days divided by 30.44 and rounded down. That is the honest trade-off behind the design: month and year lengths vary, so any month count is a convention, and deriving all of them from one exact day count keeps the results consistent and defensible. When the stakes are high, quote the days line: 90 days is unambiguous, while 3 months leaves room for interpretation. And if a result looks wrong, check the convention before the calendar: most disagreements about day counts are disagreements about whether the start or end day was counted, not about the dates themselves. The calculator cannot know which convention your document uses, so it states its own plainly and lets you translate. That translation is the whole adjustment: one day, added or subtracted, on top of a number you can trust.

¿Cómo se calcula el resultado?

Periodo de contrato: del 15 de enero al 15 de abril

Un contrato va del 15 de enero al 15 de abril de un año no bisiesto. El recuento es de 90 días de calendario: 12 semanas completas y 6 días restantes, 2 meses completos y 0 años completos. Las cuatro respuestas salen del mismo recuento de 90 días, así que son coherentes entre sí.

Entrada y resultado del ejemplo
Entrada Valor
startDate 2026-01-15
endDate 2026-04-15
Resultado 90 días · 12 semanas + 6 días · 2 meses · 0 años

100-day booking across the spring clock change: Mar 1 to Jun 9

A 100-day rental booking runs from March 1 to June 9, 2026, and the number has to be right, because the deposit, the cleaning handover, and the refund all hang on it. Count the days: March has 31 days, April 30, May 31, and June 9 is the end date, counted as a full day while the start day is not counted, so the total is 31 + 30 + 31 + 8 = 100 calendar days. The calculator splits that into 14 whole weeks and 2 remaining days, because 14 × 7 is 98. Divided by the 30.44-day average month, 100 days is 3 whole months, and it is 0 whole years. All four numbers come from that single 100-day count, so none of them can contradict another. What makes this example worth checking is the spring clock change inside the window: in most of North America and Europe the clocks move forward in March, so a naive count of 24-hour periods would be off by an hour or more. The calculator compares calendar dates, not instants, so the answer is exactly 100 days either way, like a landlord who counts rent by the calendar on the wall rather than by the clock on the mantel. If the agreement counts both the move-in and the move-out day, add one day and quote 101; if it counts midnights, 100 is the defensible number. The same two dates return the same result everywhere on Earth, which is the point of using a calculator instead of a guess.

Entrada y resultado del ejemplo
Entrada Valor
startDate 2026-03-01
endDate 2026-06-09
Resultado 100 days · 14 weeks + 2 days · 3 months · 0 years

Leap-day contract: Feb 29, 2028 to Mar 31, 2029

A project contract starts on February 29, 2028, a real date, because 2028 is a leap year, and it ends on March 31, 2029. Counting midnights: February 29 to March 1 is 1 day; the rest of 2028 contributes 31 for March, 30 for April, 31 for May, 30 for June, 31 for July, 31 for August, 30 for September, 31 for October, 30 for November, and 31 for December, which is 306 days, so February 29 to January 1, 2029 is 307 days. Then January contributes 31, February 2029 has 28 days because 2029 is not a leap year, and March contributes 30, which is 89 days, for a total of 307 + 89 = 396 calendar days. The calculator derives the other units from that single count: 396 divided by 7 is 56 whole weeks with 4 days left over; 396 divided by 30.44 is 13 whole months; and 396 divided by 365.25 is 1 whole year. The leap day is not a rounding artifact or a free day, it is a real day of work on a real contract, like a cashier who counts the pennies in the drawer, not just the bills. Notice that the years and months lines seem to disagree at a glance: 1 year and 13 months are both right, because the average year of 365.25 days is shorter than 13 average months of 395.72 days. Quote the 396-day figure in the contract and nobody needs to interpret anything: it is exact, it includes the leap day, and it is the same count in any time zone on Earth. Do the same count in your head and you will get the same number every time, which is the entire point of a stated method.

Entrada y resultado del ejemplo
Entrada Valor
startDate 2028-02-29
endDate 2029-03-31
Resultado 396 days · 56 weeks + 4 days · 13 months · 1 year

¿Cuál es la fórmula y sus supuestos?

Días de calendario

days = |dateB − dateA| in calendar days

Términos de la fórmula
Símbolo Significado
dateA, dateB las dos fechas, sin importar el orden
calendar days cada cambio de medianoche cuenta como un día

Días de calendario, no días hábiles: se incluyen fines de semana y festivos. Usa la calculadora de días hábiles cuando no deban contar.

Unidades mayores (aproximaciones)

weeks = ⌊days/7⌋ · months = ⌊days/30.44⌋ · years = ⌊days/365.25⌋

Términos de la fórmula
Símbolo Significado
⌊x⌋ función suelo: la unidad entera más grande que cabe
30.44 días medios por mes
365.25 días medios por año (años bisiestos incluidos)

¿Cuáles son los errores más comunes?

  • Contar ambos extremos (matemática «inclusiva»), lo que infla el recuento de días en uno: la calculadora usa cambios de medianoche.
  • Mezclar «semanas» y «días hábiles»: esta herramienta cuenta días de calendario; los días hábiles son otra herramienta.
  • Dejar que las diferencias de zona horaria cambien un plazo: las fechas de calendario son independientes de la zona horaria.

¿Cuáles son los supuestos y las limitaciones?

  • Las cifras de meses y años son promedios, no ligadas al calendario (por ejemplo, «2 meses» no corresponde a duraciones concretas de meses).
  • Los días de calendario incluyen fines de semana y festivos por diseño.
  • La calculadora trabaja solo con fechas; la precisión a nivel de hora queda fuera de su alcance.

¿De dónde salen los números?

Última revisión 12 de agosto de 2026 · Versión 1.1.0 · Toolivaro no garantiza el contenido externo.

Preguntas frecuentes

¿Se incluye la fecha de fin en el recuento?

La calculadora cuenta las medianoches entre las dos fechas, así que «del 1 al 2 de enero» es 1 día y «del 1 al 1 de enero» es 0 días. Si tu convención cuenta ambos extremos, suma un día al resultado.

¿Por qué los meses y los años son aproximados?

Los meses y los años de calendario tienen duraciones variables, así que cualquier recuento de meses o años es una convención. Esta calculadora los deriva del recuento exacto de días con los promedios estándar (30,44 y 365,25): coherente y defendible, y siempre de acuerdo con el recuento de días de la misma línea.

¿Influyen las zonas horarias en el resultado?

No: la calculadora compara fechas de calendario, no instantes. Dos fechas son el mismo par de días en cualquier lugar de la Tierra, así que los cambios de hora no pueden alterar el recuento de días.

Why does the result show weeks and days instead of just weeks?

Because weeks rarely divide a day count evenly. One hundred days is 14 weeks and 2 days, and 90 days is 12 weeks and 6 days: if the tool showed only whole weeks, the remainder would vanish and the number would no longer match the exact day count. The pair always reconciles: multiply the weeks by 7, add the remaining days, and you get the total days line. That check is the fastest way to trust a result, and it is why the weeks figure is shown as a pair rather than a single rounded number.

Does it matter which date goes in which field?

No. The calculator takes the absolute difference, so February 1 to March 1 and March 1 to February 1 both return 28 days in a non-leap year and 29 in a leap year. Typing the pair backward changes nothing, so there is no need to fix the order. Both fields expect dates in YYYY-MM-DD form, which the picker provides. If a result still looks wrong, check the convention before the calendar: the start day is not counted, the end day is counted when it is a full day, and identical dates return 0 days.

A lease says 30 days from March 1. Which date is that?

Under this calculator's convention, 30 days from March 1 is March 31: the start day is not counted, so there are 30 midnights between March 1 and March 31. If your lease counts the start day as day one instead, day 30 falls on March 30, and you would add one day to the tool's result to match that rule. The calculator states its own convention plainly because agreements differ, and the exact day count is the number you adjust from, whichever rule your document uses.

Parte de Herramientas de tiempo, fechas y programación

¿Encontraste un error o tienes una corrección? Repórtalo: revisamos cada corrección.

¿Te ha sido útil?

Revisado por el equipo editorial de Toolivaro según nuestra metodología Metodología · Política editorial