ThisCalculator

Everyday

Excel: Determine if a Date Is a Weekend?

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Yes, you can determine if a date falls on a weekend in Excel using the WEEKDAY function combined with a simple logical test. Enter =IF(WEEKDAY(A1,2)>5,"Weekend","Weekday") in a cell, where A1 contains the date, and Excel will return “Weekend” for Saturday or Sunday and “Weekday” for Monday through Friday.

Formula

The core formula uses Excel’s WEEKDAY function, which converts a date into a number representing the day of the week. The syntax is:

=WEEKDAY(serial_number, [return_type])

  • serial_number – the date you want to test. In Excel, dates are stored as sequential numbers; for example, January 1, 2025 is 45658.
  • return_type – a number that controls how weekdays are numbered. Using 2 makes Monday = 1, Tuesday = 2, … Sunday = 7. This is the most intuitive for weekend checks.

Once you have the weekday number, the test WEEKDAY(date,2)>5 returns TRUE for Saturday (6) and Sunday (7), and FALSE for all other days. Wrapping it in IF lets you display custom text like “Weekend” or “Weekday”.

Worked Example

Using the default date value 45658 (which corresponds to January 1, 2025, a Wednesday):

  1. Enter 45658 in cell A1.
  2. In cell B1, type =WEEKDAY(A1,2). Excel returns 3 (Wednesday).
  3. In cell C1, type =IF(B1>5,"Weekend","Weekday"). Since 3 is not greater than 5, the result is Weekday.

If you change A1 to 45660 (January 3, 2025, a Friday), the formula returns Weekday. Change it to 45661 (Saturday), and it returns Weekend.

Why Use WEEKDAY with Return Type 2?

Excel’s WEEKDAY function supports several return types. The default (no second argument) makes Sunday = 1 and Saturday = 7, which means the weekend is not a contiguous block of numbers (1 and 7). Using return type 2 aligns Monday as 1 and Sunday as 7, so the weekend is simply 6 and 7. This makes the >5 test clean and easy to read.

If you prefer to use the default, you would need =IF(OR(WEEKDAY(A1)=1,WEEKDAY(A1)=7),"Weekend","Weekday") – longer and more error-prone. The return type 2 approach is both shorter and less confusing.

Common Mistakes and How to Avoid Them

  • Forgetting the return type – If you write =WEEKDAY(A1) without the second argument, Sunday returns 1 and Saturday returns 7. Your >5 test will incorrectly mark Saturday as a weekday.
  • Using text dates – If your “date” is actually text (e.g., “2025-01-04”), WEEKDAY may still work, but it’s safer to ensure the cell is formatted as a date. Inconsistent text formats can cause errors.
  • Applying the formula to blank cells – WEEKDAY on an empty cell returns 7 (Sunday), so you’ll get “Weekend” for blanks. Use =IF(A1="","",IF(WEEKDAY(A1,2)>5,"Weekend","Weekday")) to avoid this.
  • Assuming Saturday is 6 – With return type 2, Saturday is 6 and Sunday is 7. With return type 1, Saturday is 7 and Sunday is 1. Always double-check which return type you’ve used.

How to Use the Result in Other Formulas

Once you have a weekend flag, you can use it for conditional formatting, filtering, or calculations. For example:

  • Count weekends in a range: =SUMPRODUCT(--(WEEKDAY(A1:A10,2)>5)) counts how many dates in A1:A10 fall on a weekend.
  • Highlight weekends: Select your date range, go to Home → Conditional Formatting → New Rule → Use a formula, and enter =WEEKDAY(A1,2)>5 (adjusting A1 to the active cell).
  • Calculate next workday: =WORKDAY(A1,1) returns the next business day, skipping weekends (and optionally holidays).

Alternatives to WEEKDAY

Excel offers other functions that can identify weekends, though WEEKDAY is the most direct:

  • TEXT: =TEXT(A1,"ddd") returns the abbreviated day name (e.g., “Sat”). You could test =OR(TEXT(A1,"ddd")="Sat",TEXT(A1,"ddd")="Sun"), but this is text-based and slower for large datasets.
  • NETWORKDAYS: This function counts workdays between two dates. If you compare NETWORKDAYS(A1,A1) to 1, it returns 1 for weekdays and 0 for weekends. This is useful when you also need to account for holidays.
  • ISOWEEKNUM: Not directly helpful for weekends, but useful for ISO week numbering if you need week-based grouping.

Frequently Asked Questions

Does the formula work for dates in any year?

Yes, WEEKDAY works for any date Excel recognizes, from 1900 onward (and earlier if you use the 1904 date system). The formula is year-agnostic – it only checks the day of the week, not the year.

What if my dates are in a different column or sheet?

Simply replace A1 in the formula with the appropriate cell reference. For example, =IF(WEEKDAY(Sheet2!B3,2)>5,"Weekend","Weekday") checks the date in cell B3 of Sheet2.

Can I return TRUE/FALSE instead of text?

Yes, just use =WEEKDAY(A1,2)>5 without the IF wrapper. This returns TRUE for weekends and FALSE for weekdays, which is useful for boolean logic in other formulas.

How do I check for weekends in a list of dates and sum values?

Use SUMPRODUCT with a condition. For example, if dates are in A1:A10 and values in B1:B10, =SUMPRODUCT((WEEKDAY(A1:A10,2)>5)*B1:B10) sums only the values that fall on weekends.

Why does WEEKDAY return 7 for an empty cell?

An empty cell is treated as 0, which in Excel’s date system is January 0, 1900 – a Saturday. That’s why WEEKDAY(0) returns 7 (Saturday). To avoid this, add a check for blank cells as shown earlier.

Is there a way to treat Friday as a weekend?

Yes, just change the threshold. For example, =IF(WEEKDAY(A1,2)>4,"Weekend","Weekday") treats Friday (5), Saturday (6), and Sunday (7) as the weekend. Adjust the number to match your business’s non-working days.

Related

Formula used
in d | Date (as number) | - | 45658 | 1
out is_weekend | Is weekend? | - | IF(WEEKDAY(d,2)>5,1,0) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.