Electrocardiograms (ECG or EKG)

Medically Reviewed by Zilpah Sheikh, MD on February 11, 2024
6 min read

electrocardiogram infographic

An electrocardiogram, also called an ECG or EKG, is a simple and painless test that measures the electrical impulses of your heart to check for signs of heart disease. It's done through small electrode patches that a technician attaches to the skin of your chest, arms, and legs.

With an EKG test, your doctor can quickly:

  • Check your heart rhythm
  • See if you have poor blood flow to your heart muscle (this is called ischemia)
  • Diagnose a heart attack
  • Check on things that are abnormal, such as thickened heart muscle
  • See whether there are electrolyte abnormalities, such as high potassium or high or low calcium levels

If your doctor thinks you may have a heart condition, this is probably the first test you'll get.

ECG vs. EKG

ECG and EKG are both nicknames for the same test, echocardiogram. EKG comes from the German spelling, elektrokardiogramm. Your doctor might use the term EKG to avoid confusion with an EEG, a different type of medical test that measures brain waves.

Electrocardiogram vs. echocardiogram

An echocardiogram is a different kind of test for your heart. It's an ultrasound test, which means it uses sound waves to create pictures of your heart as it beats. But with an EKG, a computer translates the electrical signals from your heart into a pattern of wavy lines that your doctor can read.

Your doctor may do different types of EKG to get the information they need about your heart. These include:

Resting EKG

This is the standard type of EKG. It's done while you're lying down and resting. It can be done in your doctor's office, a clinic, or the hospital.

Stress test

This EKG is done while you exercise on a stationary bike or treadmill. You'll gradually increase the intensity of the exercise so your doctor can see how your heart reacts.

Signal-averaged EKG

This more detailed test helps your doctor see whether you're at high risk of developing a potentially fatal heart arrhythmia. It captures the electrical signals from your heart for about 20 minutes. The readings are then averaged.

Ambulatory EKG

You get this EKG while you go about your usual daily activities. You'll wear a portable device that records your heart activity.

EKG devices

If your doctor wants to look at your heart activity outside their office, they may have you use one of these devices:

Holter monitor. This portable EKG checks the electrical activity of your heart for 1-2 days, 24 hours a day. Your doctor may suggest it if they suspect you have an abnormal heart rhythm, palpitations, or too little blood flow to your heart muscle. The electrodes from the monitor are taped to your skin. Once they're in place, you can go home and do all of your normal activities, except taking a shower. Your doctor will ask you to keep a diary of what you did and any symptoms you notice.

Event monitor. Your doctor may suggest one of these devices if you only get symptoms sometimes. With some models, you push a button, and it records and stores your heart's electrical activity for a few minutes. Others turn on automatically when they detect an irregular heartbeat. You may need to wear or carry one for weeks or sometimes months. Some of these monitors can transmit information to your doctor wirelessly.

Implantable loop monitor. This is a type of event monitor that a doctor implants just under the skin of your chest. It records your heart's electrical activity continuously for up to 3 years. You might get one if your doctor thinks you have problems with your heart rhythm, or if you repeatedly faint for no apparent reason. You can do all your normal activities with the implant, including swimming and showering.

Your heart's electrical activity controls your heartbeat. Electrocardiography lets your doctor see how much of this activity there is, how strong it is, and how much time passes between electrical impulses. In a healthy person, the heartbeat will be regular and consistent.

Your doctor might order an EKG if you have symptoms of possible heart disease such as:

  • Chest pain
  • Dizziness or lightheadedness
  • Shortness of breath
  • Extreme tiredness
  • Weakness
  • A fast or irregular heartbeat

They might use the EKG results to look for:

  • Abnormal heart rhythms (arrhythmia)
  • Enlarged heart chambers
  • Blocked or narrowed arteries in your heart
  • Heart damage
  • Heart failure

Your doctor might also use an electrocardiogram to see:

  • How well heart medications or treatments (such as pacemakers) are working
  • Whether your heart is healthy enough for a planned surgery
  • How you're doing after a heart attack

Can EKG detect heart attack?

EKG readings can show your doctor whether you're having a heart attack or have had one in the past.

If your doctor orders an EKG, it will probably be done by an electrocardiogram technician. EKG technicians are trained to use EKG machines and certified to do this type of testing.

Other medical professionals who may do the testing include cardiologists and some primary care doctors. You might also get an EKG in an ambulance or emergency room to diagnose a heart attack.

Certain smartwatches and other personal devices have EKG monitoring capabilities. They can't take the place of a professional EKG but may provide additional information. Ask your doctor if one might be helpful for you.

Things that you can do to get yourself ready for an EKG include:

  • Don't use skin creams, lotions, or talcum powder on the day of the test. They can keep the electrodes from making contact with your skin.
  • Avoid full-length hosiery, since the electrodes need to be placed directly on your legs.
  • Wear a shirt you can remove easily so the leads can be placed on your chest.
  • If you're having a stress test, avoid heavy meals and caffeine beforehand.

A technician will attach several electrodes with adhesive pads to the skin of your chest, arms, and legs. If you have hair in those areas, they may need to shave it to allow a better connection.

During a resting EKG test, you lie flat while the computer creates a picture, on a graph paper, of the electrical impulses that move through your heart. Avoid talking, as it could affect the test results.

For a stress test, you'll use a treadmill or exercise bike. You'll start off slowly, and the exercise will gradually get more intense. If you're unable to exercise, your doctor can give you a drug to raise your heart rate instead.

For an ambulatory EKG, you'll leave the health care facility after the doctor or technician attaches the electrodes. They'll tell you when to return to have them removed.

You won't feel any pain or sensation from the electrodes while they measure your heart activity. When the EKG is complete, you can return to your normal activities right away.

 How long does an EKG take?

It takes about 10 minutes to attach the electrodes and complete the resting EKG test, but the actual recording takes only a few seconds. A stress test takes 40-60 minutes.

Your doctor will keep your EKG patterns on file so that they can compare them to tests you get in the future.

Abnormal EKG results could be a sign of several conditions, including:

  • Atrial fibrillation/flutter
  • Heart attack (current or past)
  • Heart failure
  • Genetic heart defects
  • Abnormal heart rhythms (arrhythmias)
  • Sick sinus syndrome
  • Wolff-Parkinson-White syndrome
  • Poor blood supply to the heart
  • Heart enlargement
  • Swelling or extra fluid in the sac around the heart
  • Heart inflammation (myocarditis)

Your doctor may be able to determine what heart condition you may have depending on which part of your results were abnormal.

If my EKG is normal, is my heart OK?

It's possible to have normal EKG results and still have a heart condition. You might need further testing before your doctor can make a diagnosis.

An EKG has few risks. It doesn't transmit electricity to your body, so it can't give you a shock. You might have a rash or skin irritation where the electrodes were removed.

Some things can interfere with the test results, including:

  • Moving or talking during the EKG test
  • Smoking or exercising before the test
  • Pregnancy
  • Obesity
  • Certain drugs
  • Swelling in your belly due to fluid buildup (ascites)
  • Electrolyte imbalances, such as too much or too little calcium, potassium, or magnesium in your blood

Before getting an EKG, make sure your doctor knows about any health conditions you may have (including pregnancy) and all medicines and supplements you take.

An electrocardiogram is a simple and painless test that can help your doctor see whether you have any heart issues. They can also use it to see how you're responding to heart medications or treatments such as a pacemaker, or if you're healthy enough for surgery. It works by measuring your heart's electrical activity, which is then converted into a graph that your doctor can interpret.