If you’re someone who likes to get up and go to the gym first thing in the morning, you’ve probably contemplated whether or not you should drink your morning cup of coffee first. Some people prefer to work out on an empty stomach and leave their first meal of the day to post-workout, but is it even possible to go to the gym without drinking coffee first? Everyone has different morning routines, but if you’re unsure of whether you should wait until before or after your workout to drink coffee, this is what you need to know:

Long story short: drink coffee before, if you can. Caffeine is known to increase energy. Drinking a cup of coffee before you hit the gym can actually lead you to a better workout, increasing your focus and endurance. When you exercise, your central nervous and heart play a considerable role, and when you drink coffee, caffeine impacts the same parts of your body. Drinking coffee before a workout can also increase the release of dopamine throughout your body, meaning you might feel happier working out, too!

Try drinking a cup of coffee between 30-60 minutes before your workout for peak benefits. It takes about 15-20 minutes for the effects of caffeine to hit, so you don’t want to be drinking coffee as you exercise as it can dehydrate you. But although drinking coffee can improve your workout, it’s definitely not necessary, and it isn’t for everyone.

If you’re someone who feels adverse side effects to coffee or isn’t a coffee drinker in general, skip the cup of joe before your workout. Otherwise, just stick to water before, during, and after your workout to stay hydrated while you sweat. If you are a coffee drinker, make sure not to drink too much before a workout and drink water during so you don’t get dehydrated. Stick to one or two cups of coffee, and you’ll reap the benefits of the caffeine in the most positive ways. Just find what works for you, your body, and your workout schedule and go from there.