As long as the "duration of stay" printed on your visa, and only between its "from" and "until" dates. That number is often shorter than 90 days, and the 90/180-day rule applies on top of it: you must keep both limits.
Read three lines on the visa sticker
- From / until: the first and last day you may be in the Schengen area. Your exit must be on or before the "until" date, not after it.
- Duration of stay: the number of days you may spend in the area within those dates, across all entries.
- Number of entries: 1, 2 or MULT. With a single-entry visa, you cannot come back after you leave.
A worked example
Your visa is valid from 1 Jun to 30 Sep 2027, multiple entries, duration of stay: 30 days.
- 1 to 10 Jun 2027: Germany (10 days).
- 1 to 25 Jul 2027: Italy (25 days).
On 25 Jul you have used 35 days. That is well under 90 in 180, but over the visa's 30 days: the stay was allowed only until 20 Jul. The shorter limit is the one that counts.
Days from before your visa
The 90/180 count looks at the last 180 days, including stays on an earlier visa or without a visa. If you were in Schengen shortly before your new visa starts, those days still count toward the 90.
Visa-free travellers
If you do not need a visa, there is no sticker: only the 90/180-day rule applies (the 90/180 rule explained).
Count your own trips
The Schengen calculator checks the 90/180-day rule; compare its result with your visa's duration of stay and "until" date yourself. Related: arrival and departure days · can you leave and come back?
Sources
This page explains the general rule. It is not legal advice. Border authorities and the EU Entry/Exit System (EES) decide your authorised stay.
I made Schengen Calculator for Android: 15 days with every feature, then a one-time purchase. No ads, no subscription.