Upvote:2
You need to fulfill two criteria to stay in the Schengen Area:
On the day you're planning your departure you have a valid visa, so the first criteria is fulfilled. You haven't said anything that allows us to say whether you will have obeyed the 90/180 rule.
But consider that your plane is cancelled or delayed for another reason, then you will suddenly not have a valid visa anymore, and thus have broken the rules. So what you're thinking of doing might (as said above, you have only given information that allows us to look at one of two requirements) be valid, but it isn't wise.