Good Friday
Catholic Holiday
Date Calculation
Easter
Christian Calendar

How can I calculate what date Catholic Good Friday falls on, given a year?

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

Catholic Good Friday is easy to derive once you can compute Western Easter Sunday: Good Friday is exactly two days before it. The only tricky part is that Easter is not on a fixed calendar date, so you need a computus algorithm rather than a simple month-day lookup.

The Rule Behind Good Friday

For the Catholic Church, Good Friday follows the Western or Gregorian Easter calculation. In plain terms:

  1. compute Easter Sunday for the given year
  2. subtract two days

So the real programming problem is "How do I calculate Western Easter?"

Use a Gregorian Computus

For modern software, the most common approach is the Gregorian computus. It is an arithmetic algorithm that returns Easter Sunday for a year in the Gregorian calendar.

Once you have Easter Sunday, Good Friday is just:

  • Easter Sunday minus 2 days

That is much better than hardcoding tables because it works for any year in your supported range.

A Runnable Python Example

The example below calculates Catholic Easter Sunday and then derives Good Friday.

python
1from datetime import date, timedelta
2
3
4def catholic_easter(year: int) -> date:
5    a = year % 19
6    b = year // 100
7    c = year % 100
8    d = b // 4
9    e = b % 4
10    f = (b + 8) // 25
11    g = (b - f + 1) // 3
12    h = (19 * a + b - d - g + 15) % 30
13    i = c // 4
14    k = c % 4
15    l = (32 + 2 * e + 2 * i - h - k) % 7
16    m = (a + 11 * h + 22 * l) // 451
17    month = (h + l - 7 * m + 114) // 31
18    day = ((h + l - 7 * m + 114) % 31) + 1
19    return date(year, month, day)
20
21
22def catholic_good_friday(year: int) -> date:
23    return catholic_easter(year) - timedelta(days=2)
24
25
26for y in [2024, 2025, 2026]:
27    print(y, catholic_good_friday(y))

This is the standard pattern you want in most applications.

Why Not Use a Fixed Formula for Good Friday Alone

Good Friday depends on Easter, and Easter depends on ecclesiastical calendar rules tied to the spring full moon. Because of that, Good Friday can fall on different dates from year to year, usually in late March or April.

Trying to calculate Good Friday directly with a shortcut is unnecessary. Compute Easter correctly once, then subtract two days.

A JavaScript Version

If you are working on a web or Node.js application, the same logic translates cleanly.

javascript
1function catholicEaster(year) {
2  const a = year % 19;
3  const b = Math.floor(year / 100);
4  const c = year % 100;
5  const d = Math.floor(b / 4);
6  const e = b % 4;
7  const f = Math.floor((b + 8) / 25);
8  const g = Math.floor((b - f + 1) / 3);
9  const h = (19 * a + b - d - g + 15) % 30;
10  const i = Math.floor(c / 4);
11  const k = c % 4;
12  const l = (32 + 2 * e + 2 * i - h - k) % 7;
13  const m = Math.floor((a + 11 * h + 22 * l) / 451);
14  const month = Math.floor((h + l - 7 * m + 114) / 31);
15  const day = ((h + l - 7 * m + 114) % 31) + 1;
16  return new Date(Date.UTC(year, month - 1, day));
17}
18
19function catholicGoodFriday(year) {
20  const easter = catholicEaster(year);
21  easter.setUTCDate(easter.getUTCDate() - 2);
22  return easter;
23}
24
25console.log(catholicGoodFriday(2026).toISOString().slice(0, 10));

Using UTC avoids timezone surprises if all you care about is the calendar date.

Catholic Versus Orthodox Dates

This distinction matters. If your requirement is specifically Catholic Good Friday, use the Western Gregorian calculation. Orthodox Easter often follows a different calculation path and may fall on a different date.

So if the business requirement says:

  • Catholic
  • Roman Catholic
  • Western Christian

then the Gregorian computus is the right choice.

When a Lookup Table Is Acceptable

A lookup table can be fine if:

  • your supported year range is tiny
  • you only need a few years
  • correctness is already verified elsewhere

But for a reusable program, the arithmetic algorithm is cleaner and easier to maintain. It avoids stale data and makes testing easier.

Testing the Result

Because the algorithm is deterministic, unit tests are straightforward.

python
1def test_good_friday_2025():
2    assert str(catholic_good_friday(2025)) == "2025-04-18"
3
4
5def test_good_friday_2026():
6    assert str(catholic_good_friday(2026)) == "2026-04-03"

A couple of known-date tests are usually enough to prove your implementation is wired correctly.

Common Pitfalls

  • Mixing Catholic or Western Easter rules with Orthodox Easter rules.
  • Forgetting that Good Friday is Easter minus two days, not a separate independent computation.
  • Using local timezones when you only need a date, which can create off-by-one formatting bugs.
  • Hardcoding a few years and assuming the pattern repeats simply.
  • Using an incomplete or simplified Easter formula that does not follow the Gregorian rule set.

Summary

  • Catholic Good Friday is two days before Western Easter Sunday.
  • The real task is computing Gregorian Easter correctly.
  • A standard computus algorithm is the safest software solution.
  • After you have Easter, subtract two days to get Good Friday.
  • Be explicit about Catholic or Western rules so you do not accidentally compute the Orthodox date.

Course illustration
Course illustration

All Rights Reserved.