# Schengen 90/180 Day Counter > Count your days in the Schengen area: days used, latest legal exit and the longest next stay. Enter your past and planned stays in the Schengen area. The counter applies the rolling 90/180-day rule of the Schengen Borders Code to every day of stay: how many days you have used on a date, whether any stay was too long, the last day you may stay, how long your next stay can be and when a full 90-day stay is possible again. Part of usefulweb.site (https://usefulweb.site/). Part of [Hearth](https://hearth.usefulweb.site/) (ownerApp: hearth). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://hearthschengendays.usefulweb.site/ (interactive tool at https://hearthschengendays.usefulweb.site/tool) - JSON API: POST https://hearthschengendays.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://hearthschengendays.usefulweb.site/api/v1/tool) - OpenAPI: https://hearthschengendays.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://hearthschengendays.usefulweb.site/mcp - tool `hearth_schengen_days` ## Inputs - stays (table): Stays in the Schengen area - One row per stay; the day of entry and the day of exit both count. Planned stays count too. - checkDate (date, required): Check on (date of control or planned entry) - plannedLength (integer): Length of your next stay (days) - Finds the earliest entry date from which a stay this long fits the rule. ## Method - Rule: Regulation (EU) 2016/399 (Schengen Borders Code), Article 6(1) — stays of no more than 90 days in any 180-day period, considering the 180-day period preceding each day of stay. Article 6(2): the day of entry and the day of exit both count as days of stay. - For every day D the counter adds up the days of stay from D − 179 to D (180 days including D). A day of stay with more than 90 days in its window is an overstay; consecutive overstay days are reported as one period. - Latest legal exit: when the check date lies inside a stay, that stay is rebuilt day by day from its entry on top of all other stays, and the last day that keeps every day of stay at 90 or fewer is the latest exit. Longest next stay: the same from the check date (or the day after the current stay ends) without a recorded stay; planned stays later on are included, so a new stay never pushes them over the limit. - Earliest entry: the first day from which a stay of the length you enter (and, separately, a full 90-day stay) fits, searched up to two years ahead. Overlapping stays are merged so that each day counts once. - Checked against the worked example in the European Commission’s user manual for its short-stay calculator (entry 1 June 2024 after a day on 1 January: 15 days used on 14 June, last authorised day 29 August, overstay from 30 August) and against a brute-force count in the tests. ## Limits - A planning aid, not a legal decision: the border guards and the European Commission’s official short-stay calculator are authoritative. Visa stickers can allow fewer days; residence permits, long-stay visas, bilateral visa-waiver agreements and the Brazil agreement are not modelled. Stays in Cyprus and Ireland do not count.