Add each stay (entry and exit date, both days count as days in the country). The tool counts how many days you used in the 180 days ending on the check date.
For any date, the window is that date and the 179 days before it. Every day inside a stay that falls in the window counts, including the entry and exit days. The "must leave by" date is the last day on which the count stays within the limit if you remain continuously from the check date.
This is a date-arithmetic aid, not legal advice. Whether the 90/180 rule applies to you, and how, depends on your nationality, visa or permit type and the country. Always confirm with the official immigration authority (for Turkey: e-ikamet / turkiye.gov.tr / the Presidency of Migration Management). All calculation happens in your browser; no data is sent anywhere.