TopicsCheat sheetLessons
Lurndo › Excel › Date calculations

Learning Excel: Date calculations

Calculating with dates

How many days to go until the wedding? How old will Thomas be on the big day? And does the menu tasting really fall on a Saturday? Because dates are numbers, each answer is a small formula.

Days in between

Subtract one date from another and you get the number of days in between. =B7-B2 gives 209: that's how many days there are between booking the venue and the wedding.

Put a result like that in a cell with a number format, like column C. In a date column you'd see a strange date in 1900.

C7
fx

=B7-B2

ABCD
1WhatDateNumberDate
2Book the venue11/15/2026
3Send the invitations1/30/2027
4Menu tasting3/6/2027
5RSVP deadline4/10/2027
6Dress fitting5/8/2027
7Wedding6/12/2027209
8Ellie born3/14/1996
9Thomas born11/2/1994
10

DATEDIF

For whole years or months you use DATEDIF: the start date, the end date and a unit. "Y" counts whole years, "M" whole months and "D" days.

In C8, =DATEDIF(B8,B7,"Y") gives 31: Ellie's age on the wedding day. Excel doesn't suggest this function as you type, but it works all the same.

C8
fx

=DATEDIF(B8,B7,"Y")

ABCD
1WhatDateNumberDate
2Book the venue11/15/2026
3Send the invitations1/30/2027
4Menu tasting3/6/2027
5RSVP deadline4/10/2027
6Dress fitting5/8/2027
7Wedding6/12/2027
8Ellie born3/14/199631
9Thomas born11/2/1994
10

WEEKDAY

WEEKDAY gives the day of the week as a number. Without a second argument the week starts on Sunday. With 2, Monday is 1 and Sunday is 7, the way the week runs on a British calendar.

=WEEKDAY(B7,2) gives 6: the wedding falls on a Saturday.

C7
fx

=WEEKDAY(B7,2)

ABCD
1WhatDateNumberDate
2Book the venue11/15/2026
3Send the invitations1/30/2027
4Menu tasting3/6/2027
5RSVP deadline4/10/2027
6Dress fitting5/8/2027
7Wedding6/12/20276
8Ellie born3/14/1996
9Thomas born11/2/1994
10

Try it yourself

How many days are left until the wedding? Work it out in C7.

ABCD
1WhatDateNumberDate
2Book the venue11/15/2026
3Send the invitations1/30/2027
4Menu tasting3/6/2027
5RSVP deadline4/10/2027
6Dress fitting5/8/2027
7Wedding6/12/2027
8Ellie born3/14/1996
9Thomas born11/2/1994
10
C7

Ready for more?

The full lesson has 4 exercises, from easy to challenging, with hints, points and a streak you can build.

Start the lesson
← PreviousDates are numbersNext →Sorting

SQL

  • Topics
  • All lessons
  • Cheat sheet

Excel

  • Topics
  • All lessons
  • Shortcuts

HTML & CSS

  • About the course
  • All lessons

Lurndo

  • Dashboard
  • Leaderboard
  • Premium
  • Account
  • Privacy
Nederlands