Practice by topic / Excel / Dates & Times

DATEDIF and TODAY Exercises

These 10 exercises build up step by step, starting with age in full years, months of service, days with datedif.

3 of 10 free · no sign-up needed · graded on the formula you write

All 10 DATEDIF and TODAY exercises

1

Age in Full Years

Free

A2 holds a date of birth and B2 a report date. Write a formula in C2 that returns the person's age in full years on the report date.

ABC
1Date of birthAs ofAge
221 Jul 199016 Mar 2026?
Show the solution

DATEDIF takes the start date, the end date and a unit. Use =DATEDIF(A2,B2,"Y")

Right — DATEDIF with "Y" counts only complete years, which is how ages work.

Expected result in C2: 35

Try it in the live spreadsheet →
2

Months of Service

Free

A2 holds the date an employee joined and B2 a report date. Write a formula in C2 that returns their complete months of service.

ABC
1JoinedAs ofMonths
21 Sep 202316 Mar 2026?
Show the solution

Use DATEDIF with the "M" unit. Use =DATEDIF(A2,B2,"M")

Good — the "M" unit counts complete months.

Expected result in C2: 30

Try it in the live spreadsheet →
3

Days With DATEDIF

Free

A2 holds a start date and B2 an end date. Write a formula in C2 that uses DATEDIF to return the number of days between them.

ABC
1StartEndDays
21 Jan 202616 Mar 2026?
Show the solution

Use DATEDIF with the "D" unit. Use =DATEDIF(A2,B2,"D")

Right — "D" gives the same answer as subtracting the dates.

Expected result in C2: 74

Try it in the live spreadsheet →
4

Months Beyond Whole Years

A2 holds a joining date and B2 a report date. Write a formula in C2 that returns the months of service left over after counting whole years.

ABC
1JoinedAs ofExtra months
21 Sep 202316 Mar 2026?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
5

Tenure as Text

A2 holds a joining date and B2 a report date. Write a formula in C2 that returns the tenure as text, like '2 years 6 months'.

ABC
1JoinedAs ofTenure
21 Sep 202316 Mar 2026?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
6

Days Until a Deadline

Assume today is 16 Mar 2026. A2 holds a deadline. Write a formula in B2 that returns the days left until it, using TODAY so it stays current.

AB
1DeadlineDays left
23 Apr 2026?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
7

Overdue or Open

Assume today is 16 Mar 2026. A2 holds a task's due date. Write a formula in B2 that returns 'Overdue' if the due date has passed, otherwise 'Open'.

AB
1Due dateStatus
210 Mar 2026?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
8

Age Today

Assume today is 16 Mar 2026. A2 holds a date of birth. Write a formula in B2 that returns the person's age today in full years.

AB
1Date of birthAge
25 Dec 2001?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
9

Days Since the Last Order

Assume today is 16 Mar 2026. B2 holds a customer's last order date. Write a formula in C2 that returns how many days ago that was.

ABC
1CustomerLast orderDays since
2Lim & Co27 Feb 2026?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
10

Leave After 3 Months

Assume today is 16 Mar 2026. Staff can take leave after 3 complete months of service. A2 holds a joining date. Write a formula in B2 that returns 'Eligible' or 'Not yet'.

AB
1JoinedLeave status
220 Dec 2025?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →