BBampaa

Lessons › Excel & Google Sheets

Excel & Google Sheets lesson

Days between dates

Delivered minus ordered: 3 days.

Try this lesson free →
About 5–10 minutes · no sign-up needed

Example

Spreadsheets store dates as numbers, one per day, so you can subtract them:

=C2-B2

Typed into cell D2 of this sheet:

OrderOrderedDeliveredDaysExtra
O101{'date': '2024-03-01'}{'date': '2024-03-04'}
O102{'date': '2024-03-04'}{'date': '2024-03-08'}
O103{'date': '2024-03-05'}{'date': '2024-03-06'}
O104{'date': '2024-03-07'}{'date': '2024-03-14'}
O105{'date': '2024-03-11'}{'date': '2024-03-13'}

Key points

C2-B2Later date minus earlier date: the days between.
DAYS(C2,B2)The same, as a function. The later date goes first.
Why it worksEvery date is stored as a number, one higher each day.

Put together: =C2-B2, or =DAYS(C2,B2).

Practice

Try each one in your head first, then open the answer.

1. In D3, work out how many days order O102 took.
=C3-B3
2. In D5, work out how many days order O104 took, using DAYS.
=DAYS(C5,B5)
3. In D4, work out how many days order O103 took.
=C4-B4
4. In D6, work out how many days order O105 took, using the DAYS function.
=DAYS(C6,B6)
5. In E2, work out how many days passed from O101 being ordered (B2) to O105 being delivered (C6).
=C6-B2

Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.

Try this lesson free →
About 5–10 minutes · no sign-up needed