{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"leap-year"},"result":{"entity_type":"calculator","id":"leap-year","calculator_id":"leap-year","canonical_url":"https://tttkmbb.com/everyday/leap-year","name":"Leap Year Calculator","title":"Leap Year Calculator – Is a Year a Leap Year? (Gregorian Rule, Next and Previous)","category":"everyday","category_name":"Everyday Life","tool_name":"classify_leap_year","featured_mcp_tool":false,"description":"Applies the Gregorian leap-year rule (divisible by 4, except centuries not divisible by 400) to a year and reports the reason, the number of days in the year and in February, and the next and previous leap years.","use_when":"You need to know whether a year has 29 February, why, or when the next leap year occurs.","do_not_use_when":"You need the weekday or ISO week of a specific date (use day-of-week) or day counts between dates (use date-difference).","inputs":[{"name":"year","label":"Year","type":"integer","required":true,"min":1,"max":9999,"description":"Year in the (proleptic) Gregorian calendar.","example":2024}],"outputs":[{"name":"is_leap","label":"Leap year","type":"boolean","decimals":4,"description":"true when the year has 366 days."},{"name":"reason","label":"Reason","type":"string","decimals":4,"description":"Which part of the rule decided the result."},{"name":"days_in_year","label":"Days in year","type":"integer","unit":"days","decimals":4,"description":"365 or 366."},{"name":"days_in_february","label":"Days in February","type":"integer","unit":"days","decimals":4,"description":"28 or 29."},{"name":"next_leap_year","label":"Next leap year","type":"integer","decimals":4,"description":"First leap year after the given year."},{"name":"previous_leap_year","label":"Previous leap year","type":"integer","decimals":4,"description":"Last leap year before the given year (absent for years before 4)."}],"input_schema":{"type":"object","properties":{"year":{"description":"Year in the (proleptic) Gregorian calendar.","type":"integer","minimum":1,"maximum":9999,"examples":[2024]}},"additionalProperties":false,"required":["year"]},"output_schema":{"type":"object","properties":{"is_leap":{"description":"true when the year has 366 days.","type":"boolean"},"reason":{"description":"Which part of the rule decided the result.","type":"string"},"days_in_year":{"description":"365 or 366. Unit: days.","type":"integer","x-unit":"days"},"days_in_february":{"description":"28 or 29. Unit: days.","type":"integer","x-unit":"days"},"next_leap_year":{"description":"First leap year after the given year.","type":"integer"},"previous_leap_year":{"description":"Last leap year before the given year (absent for years before 4).","type":"integer"}}},"formula":"is_leap = (year mod 4 = 0 and year mod 100 ≠ 0) or year mod 400 = 0","method":"The Gregorian rule gives a mean year of 365.2425 days. Years before 1582 (or before a country's adoption date) were actually reckoned in the Julian calendar, where every fourth year is leap; this calculator applies the Gregorian rule proleptically.","sources":[{"name":"US Naval Observatory – Leap Years","url":"https://aa.usno.navy.mil/faq/leap_years","type":"government","retrieved_at":"2026-09-23"},{"name":"Leap year (Wikipedia)","url":"https://en.wikipedia.org/wiki/Leap_year","type":"reference","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"2024","inputs":{"year":2024},"expected":{"is_leap":true,"reason":"Divisible by 4 and not by 100","days_in_year":366,"days_in_february":29,"next_leap_year":2028,"previous_leap_year":2020},"url":"https://tttkmbb.com/api/v1/calculate/leap-year?year=2024"},{"name":"1900 (century year not divisible by 400)","inputs":{"year":1900},"expected":{"is_leap":false,"reason":"Divisible by 100 but not by 400","days_in_year":365,"days_in_february":28,"next_leap_year":1904,"previous_leap_year":1896},"url":"https://tttkmbb.com/api/v1/calculate/leap-year?year=1900"}],"faq":[{"q":"Was 2000 a leap year?","a":"Yes: it is divisible by 400. 1900 and 2100 are not leap years because they are divisible by 100 but not by 400."},{"q":"Why does the rule skip some century years?","a":"A solar year is about 365.2422 days; adding a day every 4 years overshoots, so 3 leap days are dropped every 400 years to keep the calendar aligned with the seasons."}],"tags":["leap year","is it a leap year","february 29","leap day","next leap year"],"related":[{"calculator_id":"day-of-week","reason":"Weekday, day of year and ISO week of a date."},{"calculator_id":"age","reason":"Ages for people born on 29 February."}],"links":{"html":"https://tttkmbb.com/everyday/leap-year","markdown":"https://tttkmbb.com/everyday/leap-year.md","json":"https://tttkmbb.com/everyday/leap-year.json","api":"https://tttkmbb.com/api/v1/calculate/leap-year","schema":"https://tttkmbb.com/api/v1/calculators/leap-year","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:29:57Z","next_actions":[{"tool":"run_calculator","calculator_id":"leap-year","reason":"Run Leap Year Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/everyday/leap-year.md"}}