Magnesium is an essential mineral for maintaining heart health. It supports the functioning of the heart muscle and the relaxing of blood vessels. You may want talk to your doctor about the right amount of magnesium for you, since too much can lower your heart rate to dangerous levels.  In general, teenagers should strive to get 360 to 410 mg of magnesium each day. Adults need approximately 310 to 420 mg daily.  Foods rich in magnesium include:  Green leafy vegetables, such as spinach Whole grains Nuts (such as almonds, walnuts, and cashews) Black beans Potassium is essential for the proper functioning of all cells, tissues, and organs in your body. It also directly impacts your heart rate, and increasing your intake can lower your heart rate.  Generally, teenagers should get 2,300 to 3,000 mg of potassium per day. Adults need between 2,600 to 3,400 mg of potassium daily.  Foods rich in potassium include:  Some fish (salmon, cod, flounder) Most fruits and vegetables Legumes (beans and lentils) Dairy products (milk, cheese, yogurt, etc.) Calcium is an electrolyte like potassium and magnesium. Your heartbeat’s strength depends on the amount of calcium in your heart muscle's cells, so it is essential for heart health.  Teenagers need about 1,300 mg of calcium every day. Adults should aim for 1,000 to 1,200 mg daily.  Good sources of calcium include:  Dairy products (milk, cheese, yogurt, etc.) Dark green vegetables (broccoli, kale, collard greens, etc.) Sardines Almond milk Caffeine is a stimulant that raises your heart rate and the effects can last for hours after consumption. For this reason, it is best to avoid caffeine if you are trying to lower your heart rate.  400 mg of caffeine daily is considered to be safe for healthy adults. If you're concerned about your heart rate, you should stay well below that amount or abstain from caffeine entirely.  Products containing caffeine include:  Coffee Black and green teas Some sodas Chocolate

Summary:
Eat foods high in magnesium to support your vascular system. Get adequate amounts of potassium to keep cells and organs healthy. Include calcium in your diet to keep your heart strong. Avoid or limit your caffeine intake to prevent rapid heartbeat.