Use a Week Calculator to convert a date into its week number (typically ISO 8601) and to convert a week/year back into an exact calendar date. This article explains the rules, the exact formulas, and common pitfalls like year boundaries.
What a Week Calculator Does
A week number is a way to group days into weeks for planning, reporting, and scheduling. A Week Calculator takes a date and returns the week number and week-year using a standard definition. It can also do the reverse: given a week number and week-year, it returns the corresponding date.
To avoid confusion, the calculator in this page uses ISO 8601 week dates:
- Weeks start on Monday.
- Week 1 is the week that contains January 4.
- The week-year can differ from the calendar year near New Year.
Key Terms and Variables
Calendar date (input)
This is your standard YYYY-MM-DD date. The calculator converts it into ISO week information.
ISO week number (output)
This is a number from 01 to 53 indicating which week of the ISO year the date belongs to.
ISO week-year (output)
This is the year associated with the week. For dates near January and December, the week-year may be the previous or next calendar year.
Day of week (output)
ISO day numbers use Monday = 1 through Sunday = 7. The calculator can return the day index so you can verify the mapping.
ISO Week Rules (The “Why” Behind the Numbers)
ISO week numbering is designed so that weeks align cleanly across years. The core rule is simple: Week 1 is the week containing January 4. From there, every other week follows by counting whole weeks starting on Monday.
In practice, the algorithm does three things:
- Find the Thursday of the week that contains your date (because ISO weeks are anchored by Thursday).
- Use the Thursday’s year to determine the week-year.
- Compute how many full weeks separate your date’s week from the first ISO week of that week-year.
Formulas Used by the Calculator
The calculator uses a date-based approach that works reliably across leap years and year boundaries.
1) Compute ISO week-year and week number from a date
Let:
- d = your input date
- dow = ISO day of week for d (Mon=1 … Sun=7)
The algorithm shifts the date to the week’s Thursday:
- thursday = d + (4 – dow) days
Then:
- weekYear = year(thursday)
- week1Thursday = Thursday of the week containing Jan 4 of weekYear
- weekNumber = 1 + floor((thursday – week1Thursday) / 7 days)
2) Convert week/year back into a date
Given:
- weekYear
- weekNumber
- isoDay (Mon=1 … Sun=7). The calculator defaults to Monday if you don’t change it.
Compute the Monday of the target week:
- week1Monday = Monday of the week containing Jan 4 of weekYear
- targetDate = week1Monday + (weekNumber – 1) * 7 + (isoDay – 1) days
Common Pitfalls (And How to Avoid Them)
- Week-year ≠ calendar year: A date like late December can belong to ISO week-year of the next year.
- Different standards exist: Some systems use Sunday-start weeks or “first week contains Jan 1.” ISO is the standard used here.
- Time zones: If you compute dates with timestamps, midnight offsets can shift results. This calculator uses a stable, local-date approach.
How to Use This Week Calculator
Pick the direction you need:
- Date → Week: Enter a date to get ISO week number, week-year, and ISO day index.
- Week → Date: Enter week-year and week number (and optionally a day) to get the exact calendar date.
The calculator validates inputs and shows clear errors if a date is invalid or if the week number is outside the valid range for that ISO year.
Practical Examples
Example 1: Reporting by ISO week
Suppose your team reports weekly metrics and your dashboard expects ISO week numbers. If you enter 2026-01-04, the calculator returns the correct ISO week number and week-year. This prevents off-by-one errors around New Year.
Example 2: Scheduling a meeting “in week 32”
You schedule a meeting for week 32 of a given year and want the date for Monday. Enter the week-year and week number, set the day to Monday, and the calculator returns the exact calendar date.
Frequently Asked Questions
What week numbering system does the Week Calculator use?
This Week Calculator uses ISO 8601 week dates. Weeks start on Monday, and Week 1 is the week that contains January 4. That means the week-year can differ from the calendar year for dates near New Year, especially in late December and early January.
Why does my date show a different week-year than the calendar year?
ISO week-year is based on the week that contains the date, not the calendar year alone. For dates near January 1 or December 31, the week may belong to the previous or next ISO year. The calculator follows the ISO rule anchored by Thursday.
Can ISO weeks be 53 weeks long?
Yes. Some ISO years have 53 weeks, while others have 52. The calculator checks the ISO structure for the specified week-year, so it only allows week numbers that actually exist. This prevents invalid inputs like week 53 in a 52-week year.
How do I convert a week number back into a date?
Enter the week-year and week number, then choose an ISO day of week (Mon=1 through Sun=7). The calculator computes the Monday of ISO week 1 and adds whole weeks plus the day offset to return the exact calendar date.
Do time zones affect the results?
Time zones can affect results if you compute from timestamps instead of local dates. This calculator treats the input as a calendar date and avoids fragile timestamp math. If you copy dates from another system, ensure they represent the same local calendar day.
Summary
A Week Calculator removes guesswork from weekly planning by converting between dates and ISO week numbers. It uses ISO 8601 rules so your week-year stays consistent across systems. Use it for reporting, scheduling, and data cleanup whenever week boundaries matter.