Day Calculator from Date
Day Calculation from any Date
Find out what day of the week any date falls, using simple mathematics
Enter a date and click "Calculate Day"
Step-by-Step Calculation Using this Method
About this method
This is a mathematical formula to calculate the day of the week for any given date. It's efficient and doesn't require any reference tables or complex calculations.
Question: Ann was born on January 14, 1979. Using this method, determine the day of the week on which she was born.?
A) Saturday
B) Sunday
C) Tuesday
D) Friday
Explanation:
Step 1: Adjust for January and February
In this method, January and February are treated as months of the previous year.
Original date: 01/14/1979 or January 14, 1979
Since month (1) < 3, subtract 1 from the year:
Year = 1979 - 1 = 1978
Step 2: Apply the Formula
The formula is: day Of Week = (year + (year/4) - (year/100) + (year/400) + monthCode + day) % 7
Where month codes are: [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
year = 1978
floor(year/4) = floor(1978/4) = 494
floor(year/100) = floor(1978/100) = 19
floor(year/400) = floor(1978/400) = 4
monthCode = 0
day = 14
Total = 1978 + 494 - 19 + 4 + 0 + 14 = 2471
Step 3: Calculate Remainder
Remainder calculation after division by 7 to get the day of the week
1=Monday
2=Tuesday
3=Wednesday
4=Thursday
5=Friday
6=Saturday and
0=Sunday.
Step 1: Adjust for January and February
In this method, January and February are treated as months of the previous year.
Original date: 01/14/1979 or January 14, 1979
Since month (1) < 3, subtract 1 from the year:
Year = 1979 - 1 = 1978
Step 2: Apply the Formula
The formula is: day Of Week = (year + (year/4) - (year/100) + (year/400) + monthCode + day) % 7
Where month codes are: [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
year = 1978
floor(year/4) = floor(1978/4) = 494
floor(year/100) = floor(1978/100) = 19
floor(year/400) = floor(1978/400) = 4
monthCode = 0
day = 14
Total = 1978 + 494 - 19 + 4 + 0 + 14 = 2471
Step 3: Calculate Remainder
Remainder calculation after division by 7 to get the day of the week
1=Monday
2=Tuesday
3=Wednesday
4=Thursday
5=Friday
6=Saturday and
0=Sunday.
2471 % 7 = 0 (zero)- Remainder
Day 0 (zero) corresponds to Sunday