For visas like the Schengen 90/180 rule, you must use a "rolling window" calculation. To determine if you are compliant, you look back exactly 180 days from the current day and count how many total days you spent in the region. Every day counts, including the day of entry and the day of departure, even if you only spent an hour in the country. It is important to remember that the 180-day period is not fixed to a calendar year; it shifts every day you are in the zone. To avoid overstaying, travelers are encouraged to use official "short-stay calculators" provided by government websites, which allow you to input entry and exit stamps to track your remaining allowance. If you have a long-stay visa (Type D) or a residence permit, those days do not count toward your 90-day tourist limit.