Pick what you want to calculate, tell the generator which cells hold your dates, and copy a ready-to-paste Google Sheets formula. Each formula comes with a short explanation, and you can try it with your own dates to see the result before you use it. Nothing you type leaves your browser.
Your formula
What the generator can build
| Calculation | Formula it uses | Learn more |
|---|---|---|
| Days between two dates | =B2-A2 (or +1 to count both dates) |
Days between dates |
| Working days | NETWORKDAYS |
NETWORKDAYS with holidays |
| Age in years | DATEDIF(…, "Y") |
Age from date of birth |
| Add or subtract months | EDATE |
See the note below |
| Add working days | WORKDAY |
NETWORKDAYS with holidays |
| Day of the week | TEXT(…, "dddd") |
Day name from a date |
| Last day of the month | EOMONTH(…, 0) |
See the note below |
Notes on months
- EDATE and short months. Adding one month to January 31 gives the last day of February (February 28, or February 29 in a leap year), because February has no 31st.
- EOMONTH. The second argument moves the month:
0is the same month,1the next month and-1the previous month. - Dates shown as numbers. Google Sheets normally formats the result of EDATE, WORKDAY and EOMONTH as a date. If the cell already had a number format and you see a five-digit number instead, format it with Format → Number → Date.
Commas or semicolons?
Google Sheets separates function arguments with commas in some locales and semicolons in others, depending on the spreadsheet’s locale in File → Settings. If a formula shows an error as soon as you press Enter, switch the separator option in the generator and paste it again.
The formulas this tool produces were last tested in Google Sheets on November 9, 2026.