ISO Week Number Calculator

Introduction

Week numbers look simple at first, but they solve a very practical problem: months are uneven, while weeks are regular. When a team says a report is due in week 14, everyone can plan around the same seven-day block without worrying about where one month ends and another begins. This calculator converts any calendar date into its ISO-8601 week number and, just as importantly, its ISO year. That second part matters because the ISO week year does not always match the calendar year printed on the date.

Many scheduling systems, project timelines, and accounting workflows rely on numbered weeks rather than month names. The International Organization for Standardization created the ISO-8601 week date system to provide a consistent definition. An ISO week starts on Monday and the first week of a year is the one that contains the year's first Thursday. This standard avoids ambiguity when a year begins in the middle of a week. Our calculator implements the ISO rule set so you can instantly map any calendar date to a week number.

If you have ever seen December 31 labeled as week 1 of the next year, or January 1 grouped with the final week of the previous year, you have already run into ISO week logic. That behavior is not a bug. It happens because ISO weeks are organized around whole Monday-to-Sunday blocks, not around midnight on January 1 alone. The calculator below handles that boundary logic automatically and returns a plain-language result you can copy into a spreadsheet, schedule, report, or sprint document.

How to Use

Using the calculator is straightforward. First, choose a date in the form field below. The tool accepts any standard Gregorian calendar date that your browser's date picker supports. Then press Calculate. The result area will immediately tell you which ISO week contains that date and which ISO year that week belongs to.

When you read the output, pay attention to both pieces of information. For most dates in the middle of the year, the calendar year and ISO year are identical. Near New Year's Day, though, they can differ. A date such as 2024-12-31 may belong to ISO week 1 of ISO year 2025. Likewise, a date at the start of January can belong to week 52 or 53 of the previous ISO year. If you need to paste the result into another tool, use the Copy Result button after calculating.

A good mental model is this: the calculator is not asking, “Which seven-day block of the month am I in?” It is asking, “Which standardized ISO week contains this date when weeks begin on Monday and week 1 is anchored by the first Thursday?” Once you keep that definition in mind, the result becomes much easier to interpret.

Formula

The calculation begins by finding the ordinal day of the year, denoted as d . Next we determine the day of the week, where Monday equals 1 and Sunday equals 7. The week number w is then obtained using:

Formula: w = ⌊ (d + 6 - k) / 7 ⌋ + 1

w = d + 6 - k 7 + 1

In this expression k is the ISO day of the week for January 1 of the given year. Computing k requires Zeller's congruence or an equivalent method for determining weekdays. The week number formula effectively shifts the year so that week 1 includes January's first Thursday. If the result yields zero, the date belongs to the last week of the previous year. Similarly, results above 52 or 53 may indicate the date falls in week 1 of the following year, depending on the total number of weeks.

Our JavaScript implementation follows an equivalent and very common programming approach. It converts the chosen date to a neutral UTC-based value, finds the weekday, then shifts the date forward or backward to the Thursday of the same ISO week. Once that Thursday is known, the script counts how many whole weeks have elapsed since the first day of the ISO year. This Thursday-shift method produces the same ISO answer while handling edge cases around leap years and year transitions cleanly.

That is why the result sometimes feels counterintuitive at the start or end of a year. The formula is not trying to preserve the printed year number on the calendar date. Instead, it is trying to preserve the integrity of full ISO weeks. In practice, that makes week-based planning far more reliable, because every ISO week is a complete Monday-through-Sunday block.

Example

Consider the date 2024-12-31, which is a Tuesday. At first glance, you might expect it to be in the final week of 2024 because the printed calendar year is still 2024. ISO week numbering asks a different question: which Monday-to-Sunday ISO week contains this Tuesday, and which ISO year does that week belong to? The week containing 2024-12-31 also contains Thursday, 2025-01-02. Because that Thursday lies in 2025, the entire week is ISO week 1 of ISO year 2025. So the calculator correctly reports that 2024-12-31 belongs to ISO week 1 of ISO year 2025.

Now compare that with 2025-01-05, a Sunday. It still belongs to the same Monday-to-Sunday block as 2024-12-30 through 2025-01-05, so it is also in ISO week 1 of ISO year 2025. This is one of the clearest examples of why the ISO year is necessary. Dates at the boundary of two calendar years can share the same ISO week.

A second quick example helps from the other side of the boundary. Suppose January 1 falls late in a week, before the first Thursday-based week has properly started. Then January 1, January 2, or January 3 can belong to week 52 or 53 of the previous ISO year. If you are preparing payroll, sprint boards, or weekly dashboards, that distinction keeps your reporting aligned with the same standardized week block used by everyone else.

Limitations and Assumptions

This calculator follows the ISO-8601 standard only. It does not attempt to reproduce regional week-number systems that begin on Sunday, define week 1 differently, or use custom fiscal calendars. If you compare the result here with a tool configured for a non-ISO rule set, the week number may differ even when the date is the same. That is expected, not an error.

The calculation also assumes the modern Gregorian calendar and uses the browser's date input for convenient selection. Internally, the script normalizes the chosen local date into a UTC-based calculation step so that time-of-day and daylight-saving transitions do not distort the week number. For everyday business, academic, and planning use, this is exactly what you want. For historical work involving pre-Gregorian dates or specialized archival calendars, you would need a different calendar model.

Why Track Week Numbers?

Week-based scheduling simplifies comparisons across years because each week always has seven days and begins on Monday. Businesses commonly use week numbers for payroll, production cycles, and sprint planning. Academic institutions align semesters and exam periods with week numbers to produce repeatable yearly schedules. In personal contexts, travelers might track vacation countdowns by week number, while fitness enthusiasts follow training plans built around specified weeks.

Many countries publish their official calendars with week numbers printed in the margins. Software like Microsoft Excel and various project management tools include functions to compute week numbers automatically. Nonetheless, discrepancies arise when different regions use alternative rules such as starting weeks on Sunday or defining week one differently. Relying on the ISO standard prevents such confusion and ensures compatibility across international teams.

Algorithm Details

Our JavaScript implementation follows a sequence of steps that mirrors the standard. After parsing the input date, we calculate the day of year by subtracting January 1 and adjusting for leap years. We then determine the weekday using the built-in Date object, mapping Sunday to 7 to maintain the ISO convention. To find k , the weekday of January 1, we create a new date object for the first day of the year and compute its ISO weekday. With these values, the formula above yields a preliminary week number.

If the preliminary number is zero, the date actually belongs to the preceding year's last week. To handle this, we compute the number of days in the previous year (365 or 366) and redo the calculation using December 31 of that year. Conversely, if the week number exceeds 52, we test whether the current year has a 53rd week. According to ISO rules, a year has 53 weeks if it is a leap year starting on Thursday or a non-leap year starting on Wednesday. If neither condition is met, any date beyond week 52 belongs to week 1 of the following year.

In the shorter production code on this page, that same logic is expressed with a compact Thursday adjustment. The script moves the selected date to the Thursday of the same ISO week, finds the UTC start of that ISO year, and then counts full seven-day intervals. Although the code is concise, it is still implementing the same rule set described above. That is why the calculator remains fast, private, and easy to audit.

Sample Week Numbers

Sample ISO week numbers across different years
Date Week Notes
2024-01-01 1 First week contains January's first Thursday
2024-12-31 1 Falls in week 1 of 2025
2025-01-05 1 Sunday at end of week 1
2025-12-31 1 Part of first week of 2026
2026-07-04 27 Mid-year holiday in week 27

These examples reveal how week numbers can wrap around year boundaries. December 31 often falls in week 1 of the next year, meaning New Year's Eve can be labeled with the following year's week number. Such behavior underscores the importance of using a standardized system when cataloging events.

Practical Use Cases

Counting weeks is an ancient practice. Farmers measured growing seasons, sailors tracked voyages, and religious observances followed weekly cycles long before the Gregorian calendar existed. The ISO system builds on this heritage, providing rules that work even when months vary in length. Modern businesses appreciate weeks because they facilitate resource planning. A construction project scheduled to last 40 weeks fits neatly into a calendar without worrying about month boundaries. Project managers can map tasks, milestones, and reviews to specific week numbers, providing a predictable cadence for teams.

In software development, agile methodologies rely heavily on week numbers. Two-week sprints are common in Scrum frameworks, and teams often label sprints by week number. Doing so ensures clarity when referencing tasks across time zones and fiscal years. Similarly, supply chains use week numbers to forecast inventory needs. Manufacturers know which week a shipment will depart, and retailers plan promotions weeks in advance.

Week numbers also help with personal organization. Habit trackers, journaling systems, and academic planners frequently index entries by week. For instance, someone training for a marathon might record mileage for week 12 of a 16-week plan. Nutrition coaches often assign meal plans based on week sequences. The ISO system's adherence to Monday as the start of the week aligns with common work schedules, making it intuitive for many users.

Our calculator's client-side nature ensures privacy: no dates are transmitted to servers. It works offline once loaded, making it handy for travel or fieldwork. Users simply pick a date, press Calculate, and receive the week number along with the ISO year. The display updates immediately, and the Copy button saves the result to the clipboard for quick sharing in documents or spreadsheets.

Behind the scenes, the algorithm accounts for leap years by checking whether February has 29 days. Leap years are those divisible by four, except years divisible by 100 unless also divisible by 400. This rule ensures synchronization with astronomical seasons over long periods. Leap years affect week numbering because they shift the ordinal day values after February.

Another nuance arises around the start of the ISO year. Because week 1 contains January's first Thursday, dates at the beginning of January may belong to week 52 or 53 of the previous year. This is particularly relevant for businesses that issue weekly reports: data from January 1 might be associated with the prior year's closing week. Our calculator explicitly displays the ISO year alongside the week number to prevent confusion.

For developers, the ISO week date system provides deterministic algorithms that can be implemented in almost any programming language. Many languages have built-in functions, but knowing the underlying math helps avoid pitfalls when porting code or handling edge cases. Our script is intentionally straightforward, using pure JavaScript without external libraries so it can be examined, modified, and embedded in other projects easily.

Although the ISO standard defines weeks as Monday through Sunday, some cultures still operate on different conventions. The calculator can be adapted for alternative systems by changing the weekday mapping and week-one rules. However, doing so sacrifices the interoperability that ISO week numbers provide. When collaborating across borders, sticking to ISO-8601 ensures that a given week number refers to the same date range for everyone involved.

To further illustrate the system, consider a year that begins on Thursday. Because week 1 must contain the first Thursday, January 1 will already be in week 1, and that year will have 53 weeks. Conversely, if a year starts on Monday, Tuesday, or Wednesday, the first few days belong to the previous year's week 52 or 53, and the year will typically have only 52 weeks. Our algorithm checks these conditions to deliver accurate results.

Some businesses adopt fiscal calendars that align with week numbers but shift the start of the year for accounting reasons. A common approach is the 4-4-5 calendar, which groups months into four or five-week blocks. The principles behind week numbering remain the same, and our calculator can assist when converting between calendar dates and such fiscal weeks.

In educational contexts, teachers may plan curricula in weekly segments, labeling each week of instruction. By knowing the ISO week numbers, they can align lesson plans across years, ensuring that, for instance, week 15 always coincides with a particular unit. This consistency aids in longitudinal studies and administrative planning.

Historical research also benefits from week numbering. Diaries and logs often mention events by week rather than by exact date. Converting those references to calendar dates requires understanding the week numbering scheme in use at the time. The ISO standard was formalized in the late 20th century, but earlier systems had variations. Our calculator, while based on ISO rules, provides a starting point for interpreting such historical records.

Finally, week numbers are invaluable for data analysis. Time-series datasets frequently aggregate metrics by week to smooth out daily fluctuations. Analysts comparing year-over-year performance rely on consistent weekly groupings. By converting dates to week numbers, you can quickly pivot data, compute rolling averages, or identify seasonal trends. Because our tool runs entirely in the browser, analysts can perform these conversions without importing sensitive data into third-party services.

Conclusion

Whether you are coordinating global projects, planning personal goals, or analyzing historical records, understanding week numbers streamlines communication and scheduling. The ISO-8601 system provides a universal language for weeks, and this calculator implements it with clarity and thorough explanation. By exploring the formula, algorithm, edge cases, and practical examples above, you gain the confidence to apply week numbers in real planning work instead of treating them as mysterious calendar labels.

For more date planning support, explore the date addition calculator, the date difference tool, and the agile sprint velocity calculator to coordinate timelines, retrospectives, and project sprints alongside your ISO week plans.

Enter any Gregorian calendar date. The result shows both the ISO week number and the ISO year, which can differ from the printed calendar year near New Year's Day.

Choose a date to see its week number.

Copy status messages appear here after you use the Copy Result button.

Mini-Game: ISO Week Sprint

This optional mini-game turns the same idea behind the calculator into a quick reaction challenge. The HUD gives you a target ISO week and the exact Monday-to-Sunday date range for that week. Your job is to tag the moving date chips that really belong inside that week while ignoring decoys from the week before or after. Short rounds near New Year are especially useful because they teach the most confusing part of ISO week numbering: calendar years and ISO years do not always line up.

Target2025-W01
RangeDec 30 – Jan 5
Score0
Streak0
Lives3
Time75
Best0

ISO Week Sprint

Tap or click the moving date chips that belong to the highlighted ISO week. Ignore nearby decoys from the week before or after. Boundary bursts around New Year are worth extra points because those are the dates that most often surprise people in real schedules.

Pointer or tap first. Keyboard fallback: focus the canvas, move the reticle with the arrow keys, press Enter or Space to tag a chip, and press P to pause or resume.

Best score is saved on this device. A strong run means you are reading ISO week boundaries quickly, especially when calendar years and ISO years do not match.

Embed this calculator

Copy and paste the HTML below to add the ISO Week Number Calculator - Find the Week of the Year to your website.