Hverdag · verktøy

Datokalkulator

Sammenlign to datoer eller gå fram og tilbake fra en startdato.

Kjøres i nettleseren. Ingen opplasting.

Days between dates

—

Add or subtract days

—

Dates are calculated in your browser.

Om verktøyet

Datokalkulator sem complicação.

Fra 1. januar til 31. januar går det 30 dager, fordi startdatoen ikke regnes som en hel dag. Du kan også legge til eller trekke fra et helt antall kalenderdager; helger og helligdager utelates ikke.

Veiledning

Slik bruker du Datokalkulator

The Date Calculator answers two plain questions about calendar days. How many days lie between two dates? And what date do you reach if you move a set number of days forward or back from a starting date? You pick dates with the date boxes and the answer appears at once. It counts whole calendar days only, so weekends and public holidays are included. It does not know about hours, minutes or time zones. People use it for countdowns, notice periods, trip planning and checking deadlines on a calendar they already trust.

Slik gjør du

  1. In the first box, choose a Start date and an End date with the date pickers.
  2. Tick Count both start and end dates only if you want the first day counted too. Leave it unticked for plain elapsed days.
  3. Press Calculate difference. The number of days appears next to the button.
  4. In the second box, choose a Starting date and type a whole number in Days to add. Use a minus sign to go back in time.
  5. Press Calculate date. The new date appears in year-month-day form, for example 2026-03-02.
  6. To start a new question, change the boxes and press the button again. The page has no Clear button, so reload it to wipe everything.

Eksempler

January 1 to January 31

Du skriver inn
Start
2026-01-01
Slutt
2026-01-31
Tell begge
nei
Du får
Resultat
30 days
Med begge datoer
31 days

The start day is not treated as a full day, so thirty days have passed. Ticking the inclusive box counts January 1 as well and gives thirty-one.

Kjørt med verktøyets egen kode.

Late February in a leap year and a normal year

Du skriver inn
Dato A
2028-02-28; 2028-03-01
Dato B
2027-02-28; 2027-03-01
Du får
Dato A
2 days
Dato B
1 day

The year 2028 has a February 29, so there is one extra day in between. In 2027 February ends on the 28th and March 1 follows right away.

Kjørt med verktøyets egen kode.

Dates entered in the wrong order

Du skriver inn
Start
2026-03-01
Slutt
2026-01-01
Tell begge
nei
Du får
Resultat
59 days

The tool uses the size of the gap and ignores which date is first. The answer is a positive 59 and gives no hint that the end date is earlier.

Kjørt med verktøyets egen kode.

Thirty days after the end of January

Du skriver inn
Startdato
2026-01-31
Dager å legge til
30
Du får
Resultat
2026-03-02

February 2026 has 28 days. Moving 28 days reaches February 28 plus 2 more, which lands on March 2.

Kjørt med verktøyets egen kode.

Going back 45 days

Du skriver inn
Startdato
2026-03-01
Dager å legge til
-45
Du får
Resultat
2026-01-15

Back 28 days is February 1, and 17 more days back is January 15. The minus sign is what makes the tool subtract.

Kjørt med verktøyets egen kode.

One year after a leap day

Du skriver inn
Startdato
2028-02-29
Dager å legge til
365
Du får
Resultat
2029-02-28

Adding 365 days is not the same as adding one year. Because 2029 has no February 29, the date lands on February 28.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Count the days left until a holiday, an exam or a wedding.
  • Find the date a thirty-day return window or notice period ends.
  • Check how many days passed between an invoice date and a payment date.
  • Plan a trip by finding the date that is a fixed number of days before departure.
  • Work out the length of a project phase from its start and finish dates.
  • Look back from today to see what date was exactly 100 days ago.

Begrensninger

  • It counts calendar days only. Weekends and public holidays are not removed, so it cannot answer working day questions.
  • The days to add must be a whole number with an absolute value of at most 3,652,425. A decimal such as 2.5, or an empty box, is rejected.
  • The answer to the first question has no sign. You cannot tell from the result which of the two dates is earlier.
  • When an input is not accepted, a message appears and that answer changes to a dash, so you never read an old result by mistake.
  • There is no time of day and no time zone. Two moments on the same date are always zero days apart.
  • The year-month-day result is shown in English format only. Check local rules, such as how a legal deadline is counted, before you rely on a date.

Tips

  • Decide first whether your rule counts the first day. A rental of the 1st to the 3rd is often two nights but three calendar dates.
  • Test the tool on a short span you can count on a paper calendar before you trust a long one.
  • To go forward exactly one month or one year, do not type 30 or 365. Move the month on a calendar instead.
  • If the two dates might be swapped, glance at the date boxes after you press the button, since the answer will not warn you.
  • For deadlines that exclude weekends, use a business days tool and keep this one for plain calendar counting.

Vanlige spørsmål

Sobre Datokalkulator.

How do I find the number of days between two dates?

Pick a start date and an end date in the first box, then press Calculate difference. The result is the number of elapsed calendar days. By default the starting day is not counted as a full day.

Why is the answer one less than I expected?

Most likely you expected both end dates to count. The default result is elapsed days, so January 1 to January 31 is 30. Tick the box that counts both start and end dates to get 31.

What does the tick box change?

It adds one to the day count. Use it when your rule counts the first day as well, such as a booking that includes both the arrival and the departure date. Leave it off for simple elapsed time.

Can I use a negative number of days?

Yes, in the add or subtract box. Type a minus sign before the number, such as -45, and the tool moves back in time. A positive number moves forward from the starting date.

Does it skip weekends or holidays?

No. Every calendar day is counted, including Saturdays, Sundays and public holidays. For working days only, use a business days calculator where you can set your own weekend and list holidays.

Does it handle leap years correctly?

Yes. It uses real calendar dates, so February 29 exists in a leap year like 2028 and not in 2027. A span that crosses a leap day will be one day longer than the same span in a normal year.

What if I enter the end date before the start date?

The tool still works and shows the size of the gap as a positive number. It does not say the order is reversed, so double check the two boxes when the answer looks surprising.

How is this different from a time duration calculator?

This one works with dates only and counts whole days. A time duration tool also takes hours and minutes and reports the gap in hours and minutes. Pick that one when the time of day matters.

Is my data sent anywhere?

No. The dates are worked out inside your browser on your own device, and nothing is uploaded to a server.

When should I not trust the result?

Do not rely on it alone for legal, tax or contract deadlines. Some rules count business days, exclude the first day or follow a local holiday calendar. Confirm the rule in the document or with the office involved.

Hvordan bruker du Datokalkulator?

Sammenlign to datoer eller gå fram og tilbake fra en startdato.

Lastes dataene mine opp til en server?

Nei. Behandlingen skjer i nettleseren din, og opplysningene dine lastes ikke opp.