When you’re in the eleventh hour of a high-stakes project, should you make a Starbucks run? Depends on your gender!

In this study, researchers tested how caffeine affects stress and teamwork. First, they served coffee (decaf or caffeinated) to a group of college students, and then asked them to perform a series of stressful, work-like tasks, like negotiating salaries.

Under high stress, caffeinated women reported more confidence in their performance. And for good reason—they performed better on collaborative tasks than men did (though men out-collaborated women if they hadn’t consumed caffeine). Caffeine affected men’s confidence too, but for the worse! Plus, caffeine actually impaired men’s performance on stressful work and memory tasks.

If you’re headed to a stressful meeting or interview, an extra jolt of java will give you a confidence boost and help you work well with others—as long as you’re a lady!