When you’re in a thrifty mindset, you may start to feel like a hermit — to avoid spending money, you stick around at home. That is wise. You’re doing the right thing. But you’ve got to get out and socialize at some point. That’s when you need one of the world’s greatest inventions: happy hour.

How to Truly Take Advantage of Happy Hour

Yes, happy hour offers obvious savings on food and drink. Drink prices are often cut in half. There may be special food options or special prices on house cocktails. But to really optimize happy hour, you need to establish a relationship with a bartender at a place you enjoy regularly and probably attend at full-price times.

If you’re a nice, friendly person, bartenders typically want to keep you at the bar. They’re willing to buy you a drink or two to keep you there and coming back. (Another reason it’s good to not be a jerk!) They know you have choices about where to go — and that you could easily stay home with friends and a bottle of wine (or otherwise find cheap and free things to do), leaving them with an empty bar from 5 to 7 p.m. or whenever their slow hours are.

So let’s say you’re at a bar where the glass of wine you love is $10. During happy hour, you can get it for $5, so you have two. Your tab is $10. Then the bartender buys you one more.

Voila! You just drank $30 worth of wine for $10.

How much do you tip the bartender? That’s up to you. But if you put down a $10 tip, you still get a bargain: Your total cost is $20 for what would have normally been a $30 tab. And remember, a 20 percent tip on a $30 tab would be $6, bringing your non–happy hour total to $36.

That’s a bare-bones example, without factoring in any food or taxes. And after three glasses of wine, it might be hard to do the math on a bigger bill. So take your time and consult the calculator on your phone if you need to.

How to Have a Cheap Night Out: Additional Tips

For the truly thrifty who are drinking on a budget, there’s one more must-do move: Keep an eye on time. If you don’t, you’re likely to stay deep into the regular-price hours as you enjoy the camaraderie. This is when your friendly bartender’s buyback keeps you around and starts to cost you money. Now your $5 glass of wine is back to being $10, but you still have to tip generously to say thanks for the glass on the house.

If you’re watching the clock and thinking that you want to stay and party all night, maybe you give in. But remember that you have a choice. Take a moment. Go outside. Make a phone call. Think about your financial situation and your budget — and the hangover you’re probably going to face.

If you still go back and rack up a big bar tab, hey, have a good time. I’m not gonna judge. I’m still paying off bar tabs from 2014.