How to make a 2027 calendar in Excel with one formula

January 1, 2027 is a Friday. WEEKDAY of that date, with the default return type, is 6. Sunday is 1 on that scale and Saturday is 7. One formula can spill a Sunday-through-Saturday month from that fact. The formula needs SEQUENCE, which is in Microsoft 365, Excel 2021, Excel 2024, and Excel for the web.

The printable file for these dates is the 2027 calendar with US federal holidays. Maya Ellis filled it in on 12/02/2026. The year is 2027 and the weeks start on Sunday. The file puts each day in its own cell. That is the Excel 2010 fill shown later on this page. June 19 is still a Saturday, so the observed day is June 18. July 4 is still a Sunday, so the observed day is July 5. December 25 is still a Saturday, so the observed day is December 24. Monday through Friday, skipping those observed days, is 250 workdays. She also typed six personal dates. January 18 is a hike, on the King holiday. December 24 is Christmas Eve dinner.

January starts on the Sunday before the Friday

Row 1 is the weekday names, Sunday through Saturday. The formula goes in A2, the Sunday cell under that header. The Sunday on or before January 1 is December 27, 2026. SEQUENCE then writes 6 rows and 7 columns, stepping by 1.

=LET(
  first, DATE(2027,1,1),
  start, first - WEEKDAY(first, 1) + 1,
  days, SEQUENCE(6, 7, start, 1),
  IF(MONTH(days) = MONTH(first), days, "")
)

WEEKDAY of January 1 is 6, so start is January 1 minus 6 plus 1, which is December 27. SEQUENCE(6, 7, start, 1) is that Sunday through Saturday, February 6. The IF keeps a date only when its month is January. December 27 through December 31 clear. February 1 through February 6 clear. A2 holds the formula and displays a blank.

SEQUENCE
=LET(first,DATE(2027,1,1),start,first-WEEKDAY(first,1)+1,days,SEQUENCE(6,7,start,1),IF(MONTH(days)=MONTH(first),days,""))
=LET(first,DATE(2027,1,1),start,first-WEEKDAY(first,1)+1,days,SEQUENCE(6,7,start,1),IF(MONTH(days)=MONTH(first),days,""))A2
January 2027
ABCDEFG
1SunMonTueWedThuFriSat
21/1/20271/2/2027
31/3/20271/4/20271/5/20271/6/20271/7/20271/8/20271/9/2027
41/10/20271/11/20271/12/20271/13/20271/14/20271/15/20271/16/2027
51/17/20271/18/20271/19/20271/20/20271/21/20271/22/20271/23/2027
61/24/20271/25/20271/26/20271/27/20271/28/20271/29/20271/30/2027
71/31/2027
A picture of the spill, not a live calendar. A2 holds the formula and looks blank, because December 27, 2026 is not January. January 1 is the Friday in F2. January 18, Martin Luther King Jr. Day, is the Monday in B5. The last row's blanks are February 1 through February 6.

Format the spill as a date, MM/DD/YYYY or D. January 18 is Monday, the third Monday of January. That is Birthday of Martin Luther King, Jr. It sits in B5.

#SPILL! means the cells under the formula, or to its right, are not empty. Clear the 6-by-7 block and enter the formula again. Excel 2019 returns #NAME? for SEQUENCE and for LET. On that version, put the Sunday in Z1:

=DATE(2027,1,1)-WEEKDAY(DATE(2027,1,1),1)+1

Z1 is December 27, 2026. In A2, enter the formula below and fill it across seven columns and down six rows. ROW()-2 is 0 on row 2, and COLUMN()-1 is 0 in column A, so A2 tests December 27 and F2 tests January 1.

=IF(MONTH($Z$1+(ROW()-2)*7+COLUMN()-1)=1, $Z$1+(ROW()-2)*7+COLUMN()-1, "")

Twelve month-starts from the first of January

xl.sequence.months spills the first of each month. From January 1, 2027, twelve months are January 1 through December 1. The name needs Microsoft 365, Excel 2024, or Excel for the web. The picture uses EDATE and SEQUENCE, which is the calculation inside the name:

EDATE
=EDATE(DATE(2027,1,1),SEQUENCE(12)-1)
=EDATE(DATE(2027,1,1),SEQUENCE(12)-1)A1
Month starts
A
11/1/2027
22/1/2027
33/1/2027
44/1/2027
55/1/2027
66/1/2027
77/1/2027
88/1/2027
99/1/2027
1010/1/2027
1111/1/2027
1212/1/2027
A picture of the twelve month-starts. A2 and the cells under it are the spill. February 1 and March 1, 2027 are both Mondays. Format the spill as a date.
=xl.sequence.months(DATE(2027,1,1), 12)

For February, point first at February 1 in that spill instead of DATE(2027,1,1). February 1, 2027 is a Monday, so February’s Sunday cell is January 31, and the month test clears it. March 1 is also a Monday. 2027 is not a leap year, so February has 28 days and February 28 is a Sunday.

Month start Weekday
01/01/2027 Friday
02/01/2027 Monday
03/01/2027 Monday
04/01/2027 Thursday
05/01/2027 Saturday
06/01/2027 Tuesday
07/01/2027 Thursday
08/01/2027 Sunday
09/01/2027 Wednesday
10/01/2027 Friday
11/01/2027 Monday
12/01/2027 Wednesday

WEEKDAY of each first, with Sunday as 1, is 6, 2, 2, 5, 7, 3, 5, 1, 4, 6, 2, and 4.

Federal holidays, and the three days OPM moves

OPM’s 2027 holiday schedule lists the day most Monday-through-Friday federal employees are off. The legal dates come from section 6103(a) of title 5 of the United States Code. xl.us.holiday returns the legal date. It does not move a Saturday back to Friday or a Sunday forward to Monday.

Holiday Legal date Weekday OPM day off
New Year’s Day 01/01/2027 Friday 01/01/2027
Birthday of Martin Luther King, Jr. 01/18/2027 Monday 01/18/2027
Washington’s Birthday 02/15/2027 Monday 02/15/2027
Memorial Day 05/31/2027 Monday 05/31/2027
Juneteenth National Independence Day 06/19/2027 Saturday 06/18/2027
Independence Day 07/04/2027 Sunday 07/05/2027
Labor Day 09/06/2027 Monday 09/06/2027
Columbus Day 10/11/2027 Monday 10/11/2027
Veterans Day 11/11/2027 Thursday 11/11/2027
Thanksgiving Day 11/25/2027 Thursday 11/25/2027
Christmas Day 12/25/2027 Saturday 12/24/2027

Washington’s Birthday is the name in the statute. OPM’s page says the same thing. The LAMBDA key for that Monday is Presidents.

Thanksgiving 2027 is Thursday, November 25. November 1, 2027 is a Monday, so the first Thursday is November 4, and the fourth Thursday is 21 days later. That is the same count as How to find Thanksgiving in Excel, with the year set to 2027.

=xl.us.holiday(2027, "Thanksgiving")
=xl.us.holiday(2027, "Juneteenth")

Those return November 25 and June 19. June 19 is a Saturday. OPM lists Friday, June 18, under 5 U.S.C. 6103(b): a holiday that falls on Saturday is observed the Friday before, for most federal employees. July 4, 2027 is a Sunday, and OPM lists Monday, July 5. OPM cites section 3(a) of Executive Order 11582 for a Sunday holiday moving to the following Monday. Christmas, December 25, is a Saturday, so OPM lists Friday, December 24.

WEEKDAY
=IF(WEEKDAY(B2)=7,B2-1,IF(WEEKDAY(B2)=1,B2+1,B2))
=IF(WEEKDAY(B2)=7,B2-1,IF(WEEKDAY(B2)=1,B2+1,B2))B4
Juneteenth 2027
AB
1Value
2Legal date6/19/2027
3Weekday7
4Day off6/18/2027
A picture of the legal date. June 19, 2027 is a Saturday, so WEEKDAY with Sunday as 1 returns 7. Saturday moves back one day, to Friday, June 18. That is the day OPM lists for most Monday-through-Friday employees.

The day-off formula uses the default WEEKDAY scale. Saturday is 7, so the date moves back one day. Sunday is 1, so the date moves forward one day. Any other weekday stays put. July 4, 2027 through that formula is July 5. December 25, 2027 is December 24. January 1, 2027 is a Friday and stays January 1.

Put the legal dates in a column named Holidays if the calendar should mark the statute’s day. Put the OPM column there instead if the mark should be the Monday-through-Friday day off. A cell on the grid is a holiday when COUNTIF of that list is greater than 0:

=COUNTIF(Holidays, F2)>0

January 1, in F2, is a holiday on both lists. June 19 is a holiday only on the legal list. June 18 is a holiday only on the OPM list.


Template for this article

2027 Calendar with US Federal Holidays

More from the blog