Menu
Advertisement

Japanese Era Converter: Wareki and Western Dates

Turn a Western date into its Japanese era date, or a Reiwa, Heisei, Shōwa, Taishō or Meiji date into a Western one.

By Nethanel Bar, Co-founder & CEO

Last updated

Advertisement

Ready to actually learn to code?

Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.

How Japanese era years work

Japan counts years in two ways. The Western (Gregorian) year is used everywhere, and the era name, or gengō, is still standard on official papers, forms and many calendars: the system called wareki. Since Meiji, a new era begins when a new emperor takes the throne, and its first year is written 元年 (gannen) rather than 1年. Reiwa began on May 1, 2019, so that day is Reiwa 1 (令和元年5月1日), while the same year up to April 30 is Heisei 31.

An era starts on a day, not on January 1, so a Western year can belong to two eras. 1989 is Shōwa 64 until January 7 and Heisei 1 from January 8. The tool lists every era a year belongs to, and it refuses a date the era never reached: Shōwa 64 has no January 8.

The top shows today's date in the era calendar, from your device's clock. Dates convert from January 1, 1873 (Meiji 6), the day Japan moved from its lunisolar calendar to the Gregorian one; Meiji dates before that do not match day for day. Everything runs in your browser.

What you will learn while converting era dates

  • To get the Western year, add a fixed number to the era year: 2018 for Reiwa, 1988 for Heisei, 1925 for Shōwa, 1911 for Taishō and 1867 for Meiji. Reiwa 8 plus 2018 is 2026.
  • 元年 means year one. Documents write 令和元年 rather than 令和1年; in the converter you type 1 for it.
  • Japanese dates are written year, month, day: 令和8年11月21日 is November 21, 2026. The era fields in the converter follow the same order.
  • An era table is a classic lookup: start dates sorted newest first, and a loop that returns the first era that began on or before the date. The Python example below is the whole algorithm, and JavaScript's Intl.DateTimeFormat has the same eras built in.

How to convert a Japanese era date

  1. Read today's era date

    It is at the top, with the Western date under it.

  2. Choose the direction

    Pick Western to Japanese era or Japanese era to Western. Both start on today's date.

  3. Enter the date

    For a Western date, pick the day and month and type a year from 1873 to 2100. For an era date, choose the era, type the era year (1 for 元年), then pick the month and day.

  4. Read the result

    Western to era gives the era date and every era that Western year belongs to. Era to Western gives the weekday, the date and how many days away it is. A date the era never reached says That date does not exist.

Era start and end dates

Each modern era's first and last day, its first year, and the number to add to an era year to get the Western year.

EraFirst dayLast dayYear one (元年)Western year
Reiwa (令和)May 1, 2019Current era令和元年 is 2019Reiwa year + 2018
Heisei (平成)January 8, 1989April 30, 2019 (Heisei 31)平成元年 is 1989Heisei year + 1988
Shōwa (昭和)December 25, 1926January 7, 1989 (Shōwa 64)昭和元年 is 1926Shōwa year + 1925
Taishō (大正)July 30, 1912December 24, 1926 (Taishō 15)大正元年 is 1912Taishō year + 1911
Meiji (明治)January 25, 1868, the first day of that lunisolar yearJuly 29, 1912 (Meiji 45)明治元年 is 1868Meiji year + 1867

Era dates in practice

A birth date for a Japanese form

Paste a small example into the tool and change one part at a time.

The tool shows May 15, 2 Heisei, and The year 1990 in eras reads Heisei 2. On the form that is 平成2年5月15日.

A year with two eras

Copy the original value, run the tool, then compare the result.

The result is January 7, 64 Shōwa, and the year line lists Shōwa 64 and Heisei 1. Enter Shōwa 64, January 8 in the other direction and the tool says That date does not exist, because Heisei began that day.

The last day of Heisei

Take a value from your own work and use this tool to inspect or prepare it.

The tool shows Tuesday, April 30, 2019. Heisei 31, May 1 does not exist: that day is Reiwa 1, May 1, 2019.

An era lookup in Python

Plain Python
from datetime import date
# Each era: its first day, and the number to add to an era yearERAS = [    ("Reiwa", date(2019, 5, 1), 2018),    ("Heisei", date(1989, 1, 8), 1988),    ("Showa", date(1926, 12, 25), 1925),    ("Taisho", date(1912, 7, 30), 1911),    ("Meiji", date(1868, 1, 25), 1867),]
def to_era(d):    for name, start, offset in ERAS:        if d >= start:            return name, d.year - offset
def western_year(era, year):    return {name: offset for name, _, offset in ERAS}[era] + year
print(to_era(date(2026, 11, 21)))  # ('Reiwa', 8)print(to_era(date(1989, 1, 7)))    # ('Showa', 64)print(western_year("Heisei", 31))  # 2019

The list is newest first, so the loop stops at the first era that had begun by that date: November 21, 2026 is Reiwa 8, and January 7, 1989 is still Shōwa 64. Going the other way is one addition.

Common era conversion mistakes

  • Adding the wrong number. Heisei years add 1988 and Reiwa years add 2018; mixing them up puts you 30 years off.
  • Assuming an era starts on January 1. Heisei began on January 8, 1989 and Reiwa on May 1, 2019, so the first days of those years belong to the previous era.
  • Reading 元年 as a typo. It means year one, so 令和元年 is 2019 and 平成元年 is 1989.
  • Converting dates before 1873 day for day. Japan used a lunisolar calendar until the end of Meiji 5, so those dates need a different conversion, and the tool refuses them.
  • Looking for Heisei 32 or Shōwa 65. An era ends when the next one begins, so those years do not exist: 2020 is Reiwa 2.

Japanese era converter FAQ

What is today's date in the Japanese era calendar?

The converter shows it at the top, from your device's date. The current era is Reiwa, which began on May 1, 2019.

How do I convert a Reiwa year to a Western year?

Add 2018: Reiwa 1 is 2019 and Reiwa 8 is 2026. For a full date, use Japanese era to Western.

How do I convert Heisei to a Western year?

Add 1988: Heisei 1 is 1989 and Heisei 31, the last, is 2019. Heisei ran from January 8, 1989 to April 30, 2019.

How do I convert a Showa year to a Western year?

Add 1925: Shōwa 1 is 1926 and Shōwa 64, its last year, is 1989. Shōwa ran from December 25, 1926 to January 7, 1989.

What does 元年 mean?

It means the first year of an era, written instead of 1年. 令和元年 is 2019 and 平成元年 is 1989.

What is wareki?

Wareki (和暦) is the Japanese era calendar: an era name and a year within it, as in 令和8年. The Western calendar is called seireki (西暦).

Why does the tool list two eras for one year?

Because an era starts on the day a new emperor takes the throne, not on January 1. 1989 is both Shōwa 64 and Heisei 1, and 2019 both Heisei 31 and Reiwa 1.

Why can't I convert dates before 1873?

Japan used a lunisolar calendar until Meiji 5 ended and switched to the Gregorian calendar on January 1, 1873. Earlier dates do not line up day for day, so the tool converts from that day on.

Other developer tools

Coddy programming languages illustration

Learn to code with Coddy

Get started