What Is an EKG? How It Works and What It Detects

An EKG (also written as ECG) is a quick, painless test that records the electrical activity of your heart from the surface of your body. It’s one of the most common cardiac tests in medicine, and the actual recording takes only about 10 seconds. Doctors use it to check your heart rhythm, detect signs of a heart attack, and identify a range of other heart conditions.

How an EKG Works

Every heartbeat starts with an electrical signal that spreads through the heart muscle, telling it when to contract and pump blood. An EKG picks up these signals using small sensors (called electrodes) stuck to your skin. When the electrical current moves toward a sensor, it creates an upward mark on the readout. When it moves away, the mark dips downward. The pattern of these ups and downs tells your doctor exactly how electricity is flowing through your heart, beat by beat.

A standard EKG uses 10 electrodes placed on your chest, arms, and legs. These 10 sensors generate 12 different “views” of your heart’s electrical activity, which is why you’ll hear it called a 12-lead EKG. Six electrodes go across the chest in specific positions near the breastbone and along the left side of your rib cage. The remaining four go on your limbs. Together, they create a detailed electrical map of the heart from multiple angles.

What the EKG Readout Shows

The squiggly line on an EKG printout isn’t random. Each bump and dip represents a specific event happening inside your heart during a single beat.

  • P wave: A small, rounded bump that shows the upper chambers of the heart (the atria) receiving the electrical signal and preparing to push blood into the lower chambers.
  • QRS complex: The tallest, sharpest spike on the readout. This represents the lower chambers (the ventricles) firing and contracting to pump blood out to the lungs and the rest of the body. It’s actually three waves blended together: one for the wall between the ventricles, one for the main muscle mass, and one for the base of the heart.
  • T wave: A gentler bump after the QRS complex. This shows the ventricles resetting their electrical charge, getting ready for the next beat.

Doctors look at the shape, size, and timing of these waves. A stretched-out gap between the P wave and the QRS complex could signal a problem with how electrical signals travel from the upper to lower chambers. A QRS complex that’s too wide might mean the ventricles aren’t firing in sync. Abnormalities in the T wave can point to strain on the heart muscle or problems with electrolyte levels in the blood.

What Conditions an EKG Can Detect

An EKG can reveal a surprisingly wide range of heart problems. Irregular heart rhythms (arrhythmias) are among the most common findings. The test shows whether the heart is beating too fast, too slow, or with an erratic pattern. It can also pick up atrial fibrillation, a condition where the upper chambers quiver chaotically instead of contracting in an organized way.

During or after a heart attack, parts of the heart muscle lose their blood supply and stop conducting electricity normally. This shows up as characteristic changes in the EKG waveform, particularly in the segment between the QRS complex and the T wave. An EKG can also reveal thickening of the heart walls, enlargement of the heart chambers, and the effects of certain medications or electrolyte imbalances on the heart’s electrical system.

That said, an EKG captures only a brief snapshot. If a problem comes and goes, a standard 10-second recording might miss it entirely.

What to Expect During the Test

A resting EKG is about as low-stress as medical tests get. You lie flat on an exam table while a technician sticks adhesive electrode patches to your chest, arms, and legs. If you have chest hair in the way, they may shave small patches to help the sensors make good contact. The whole process, from attaching the electrodes to finishing the recording, takes about 10 minutes. You won’t feel anything while the machine records.

There’s minimal preparation. Avoid oily or greasy lotions on your skin beforehand, since they can interfere with the electrode adhesion. Wear a shirt you can easily remove, and skip full-length tights or pantyhose that would block sensor contact on your legs. That’s about it.

Types of EKG Tests

The standard resting 12-lead EKG is the most common version, but doctors sometimes need more information than a 10-second snapshot can provide.

An exercise EKG, better known as a stress test, records your heart’s electrical activity while you walk on a treadmill or pedal a stationary bike. The goal is to see how your heart performs under physical demand. Problems with blood flow to the heart muscle often only show up when the heart is working harder. Stress tests are commonly used to check for coronary artery disease and to determine safe exercise levels after a heart attack or heart surgery.

A Holter monitor is essentially a portable EKG you wear for 24 hours or longer. Electrodes stay attached to your chest and connect to a small recording device you carry with you. This is useful when symptoms like palpitations or dizziness happen unpredictably throughout the day. A standard EKG might look perfectly normal during those 10 seconds in the office, but a Holter monitor can catch irregular rhythms that only appear during sleep, after meals, or during certain activities.

Who Needs an EKG

If you’re having symptoms like chest pain, shortness of breath, a racing heartbeat, dizziness, or fainting, an EKG is typically one of the first tests ordered. It gives doctors immediate, actionable information about what’s happening in your heart.

For people without symptoms, the picture is less clear-cut. The U.S. Preventive Services Task Force recommends against routine EKG screening for adults at low risk of cardiovascular disease, defined as having less than a 10% chance of a heart event over the next 10 years. The concern isn’t that the test is harmful (it’s completely noninvasive) but that abnormal findings in healthy people often lead to unnecessary follow-up tests and anxiety without improving outcomes. For adults at intermediate or higher risk, the evidence on routine screening is inconclusive, so the decision comes down to a conversation with your doctor about your individual risk factors.

An EKG may also be done before surgery, when starting a new medication that could affect heart rhythm, or as a baseline measurement if you have risk factors like high blood pressure, diabetes, or a family history of heart disease.