The best time to take your supplements depends on these 2 factors, experts say

Not sure when you should take your supplements? Experts say to consider these 2 things first.

If taking supplements is a part of your morning routine, you might just be popping them on auto-pilot without thinking twice about it. However, some experts suggest that when you take your vitamins and minerals could impact their absorption and effectiveness.

It’s not as simple as taking all supplements in the morning or evening. Experts say it’s important to pay attention to the type of vitamins and minerals you're taking—and the other supplements and medication you're taking with them.

Fat-soluble vs. water-soluble vitamins

There are two types of vitamins: fat-soluble and water-soluble, explains Dr. Gowri Rocco, a family medicine doctor based in New Jersey.

Vitamins A, D, E, and K, and are fat-soluble, meaning they can be absorbed by fats and oils and are stored in fatty tissue and the liver, according to the National Cancer Institute.

These can be taken at any time of day as long as they're "taken with a meal that contains healthy fats to improve absorption,” Rocco tells Fortune.

On the other hand, water-soluble vitamins, including B vitamins and vitamin C, only need water to dissolve and are not stored in the body. You can take these on an empty stomach. But if they cause stomach upset, as can sometimes happen with vitamin C, Cathi Dennehy, a doctor of pharmacy and professor of clinical pharmacy at the University of California San Francisco, recommends taking them with food.

Be mindful of how supplements can interact with one another

Timing your supplements—whether vitamins or minerals—means considering how they could interact with each other, and with other medications you’re taking.

For example, Dennehy says, calcium can interact with a common prescription thyroid medication (levothyroxine) making it less effective, so you’ll want to take them at least four hours apart. Similarly, iron and calcium compete for absorption, and should also be taken at least a few hours apart. Vitamin E can thin the blood so taking it along with commonly prescribed blood thinner, warfarin, could lead to internal bleeding or stroke, according to the Food and Drug Administration.

Some supplements work well together, such as magnesium which helps activate vitamin D. Magnesium and calcium can be also taken together, but some people absorb them better separately.

It's also important to consider how supplements affect you. For example, magnesium, which can aid with sleep, is one Rocco recommends taking at night.

Your doctor or pharmacist can guide you on potential interactions, Dennehy says.

More on dietary supplements:

This story was originally featured on Fortune.com