Free, no sign-up required

Date Formula Generator

Describe the date calculation you need in plain English — age, deadlines, business days, month math — and get a ready-to-use formula for Excel or Google Sheets.

5 free tries without an account

Common date formula syntax

Syntax
=DATEDIF(start_date, end_date, unit)
=NETWORKDAYS(start_date, end_date, [holidays])

These are two of the most common date formulas, but "date formula" covers a whole family — DATE, EDATE, EOMONTH, WORKDAY, TODAY, YEAR/MONTH/DAY, and more. Formulon picks the right function (or combination) for whatever date calculation you describe.

Examples

Calculate full years between a birth date and today

=DATEDIF(B2,TODAY(),"y")

Returns the number of complete years between the date in B2 and today's date — the standard way to calculate age from a birth date.

Count working days between two dates, excluding holidays

=NETWORKDAYS(B2,C2,E2:E10)

Counts the weekdays (Mon–Fri) between the start date in B2 and end date in C2, then subtracts any dates listed in E2:E10 that fall in that range.

Frequently asked questions

How do I calculate someone's age or the years between two dates?

Use DATEDIF with the "y" unit: =DATEDIF(birth_date,TODAY(),"y") returns the number of complete years elapsed. DATEDIF also supports "m" (months) and "d" (days) for finer-grained differences.

How do I add or subtract months from a date?

EDATE shifts a date by a number of months: =EDATE(A2,3) moves 3 months forward, =EDATE(A2,-3) moves 3 months back. Use EOMONTH instead if you want the last day of that resulting month.

How do I count business days between two dates?

NETWORKDAYS counts weekdays between two dates and can exclude a list of holidays: =NETWORKDAYS(start_date,end_date,holiday_range). Use WORKDAY to go the other way — find the date N business days from a starting date.

Are date formulas the same in Excel and Google Sheets?

Yes — DATEDIF, EDATE, EOMONTH, NETWORKDAYS, WORKDAY, TODAY, and YEAR/MONTH/DAY all work identically in both. DATEDIF is undocumented in Excel's function picker but works fine in both apps when typed manually.

Don't want to write it by hand?

Describe what you need in plain English and get a ready-to-use formula in seconds.

Try the formula generator