Your heart depends on a variety of nutrients to stay healthy, including magnesium. This essential mineral is involved in more than 300 different biochemical reactions in your body.

Read on to learn more about the function of magnesium in cardiovascular health and learn how to ensure you’re getting enough of this key mineral.

Magnesium plays a role in the biochemical reactions in your heart muscle that generate your heartbeat.

Your heart is a muscular organ. It’s made of three layers of tissue. The middle layer is your heart muscle, known as the myocardium.

Like all muscles in your body, your heart muscle relies on interactions with calcium and magnesium in order to contract and relax.

Calcium stimulates the muscle fibers of the myocardium to shorten and contract, while magnesium has the opposite effect. Magnesium blocks calcium, allowing the muscle fibers to relax. In this way, magnesium is involved in the intricate biological process that creates your heartbeat.

Magnesium also plays a key role in the sodium-potassium pump, an enzyme involved in generating electrical impulses. These electrical impulses are an important component of how your cardiovascular system functions.

The amount of magnesium a person needs varies depending on their age and sex.

The Dietary Guidelines for Americans recommends the following dietary intake of magnesium for adolescents and adults:

  • between 14 and 18 years of age: 360 mg for females, 410 mg for males
  • between 19 and 30 years of age: 310 mg for females, 400 mg for males
  • 31 years of age and over: 320 mg for females, 420 mg for males

The Dietary Guidelines for Americans also notes that many individuals consume magnesium at levels below these amounts.

Eating plenty of magnesium-rich foods throughout the day can help you get the right amount of this mineral. The U.S. Department of Agriculture (USDA) and National Institutes of Health (NIH) provide information about serving sizes of foods that contain magnesium. For example:

  • 1 ounce of dry roasted almonds (80 mg of magnesium)
  • 1/2 cup of boiled spinach (78 mg of magnesium)
  • 1 ounce of dry roasted cashews (74 mg of magnesium)
  • 1/4 cup of peanuts roasted in oil (63 mg of magnesium)
  • 1/2 cup of cooked black beans (60 mg of magnesium)
  • 2 tablespoons of smooth peanut butter (49 mg of magnesium)

Keep in mind that your body only absorbs between 30 and 40 percent of the magnesium in foods.

Another option is to take a magnesium supplement. Always check with your doctor before you start taking a new supplement. Supplements may interact with certain medications.

Magnesium is an essential mineral involved in hundreds of functions in your body, including maintaining your heart health. Eating magnesium-rich foods, such as spinach and nuts, can help you get the recommended amount of this nutrient.