Tindakan Medis & Terapi
What Is an ECG? Functions, Types, and How the Test Works
Written By
Admin TzuChi • 24 November 2026

An electrocardiogram (ECG or EKG) is a non-invasive medical test used to record the heart's electrical activity and help detect abnormalities in heart rhythm, electrical conduction, and signs of heart muscle damage.
Many people feel anxious when their doctor recommends an electrocardiogram because they imagine a complicated or uncomfortable procedure. In reality, a standard ECG is quick, painless, and an important tool for assessing heart health.
Want to know how an ECG is performed, how to prepare, and what your results mean? Read this comprehensive guide to learn more.
What Is an Electrocardiogram (ECG)?
ECG Illustration
An electrocardiogram, commonly abbreviated as ECG or EKG, is a non-invasive diagnostic test designed to record the electrical activity of the heart.
This quick and painless procedure is a fundamental tool doctors use to evaluate heart rate and rhythm, identify electrical conduction abnormalities, and detect possible signs of reduced blood flow to the heart muscle.
The terms ECG and EKG refer to the same examination.
An ECG works by placing small sensors called electrodes on the skin. These electrodes detect the natural electrical signals generated by the heart with every heartbeat.
The signals are displayed as waveforms on paper or a monitor, providing information about different phases of the cardiac electrical cycle, including depolarization and repolarization.
Functions of an Electrocardiogram (ECG)
An ECG does much more than measure your heart rate.
It provides important information that can help doctors recognize certain cardiac abnormalities and determine whether additional examinations are necessary.
The main functions of an ECG include:
1. Analyzing Heart Rhythm
An ECG helps determine whether your heart is beating regularly or showing an abnormal rhythm, known as an arrhythmia.
It can help identify:
-
Tachycardia: An abnormally fast heart rate.
-
Bradycardia: An abnormally slow heart rate.
-
Irregular heart rhythms and certain electrical conduction disorders.
Related Article: Heart Failure: Symptoms, Causes, Prevention, and Treatment
2. Detecting Current or Previous Heart Attacks
Certain ECG patterns may indicate heart muscle injury associated with a heart attack.
One critical finding is ST-segment elevation, which, in the appropriate clinical context, may indicate an acute ST-Elevation Myocardial Infarction (STEMI).
STEMI is a medical emergency that requires immediate assessment and treatment.
An ECG may also reveal changes associated with a previous heart attack.
However, a normal ECG does not completely exclude a heart attack. Doctors may also use blood tests, clinical findings, and repeat ECG recordings to establish a diagnosis.
Related Article: Heart Attack: Symptoms, Causes, Prevention, and Treatment
3. Evaluating Blood Supply to the Heart
An ECG can help detect electrical changes associated with reduced blood flow to the heart muscle, a condition known as myocardial ischemia.
Myocardial ischemia may occur when oxygen-rich blood flow is reduced because of narrowing or blockage of the coronary arteries.
Certain ECG changes may suggest ischemia or heart muscle injury, including:
-
ST-segment depression or T-wave inversion: May indicate myocardial ischemia, although these findings can also occur in other conditions.
-
ST-segment elevation: May indicate acute myocardial infarction in the appropriate clinical context.
-
Pathological Q waves: May suggest previous myocardial infarction or existing myocardial damage.
ECGs are also useful for monitoring patients over time.
Repeated ECG recordings can help doctors evaluate changes in ischemia, responses to reperfusion treatment such as thrombolysis or percutaneous coronary intervention (PCI), and complications following a heart attack, including arrhythmias.
4. Measuring Electrical Conduction Intervals
An ECG helps doctors evaluate the timing and conduction of the electrical impulses that coordinate each heartbeat.
Different components of an ECG waveform represent specific phases of the heart's electrical activity.
The main components include:
-
P Wave: Represents atrial depolarization, the electrical activation that precedes atrial contraction.
-
PR Interval: Measures the time from the beginning of atrial electrical activation to the beginning of ventricular activation. It helps identify certain conduction disorders, including atrioventricular block.
-
QRS Complex: Represents ventricular depolarization, the electrical activation that triggers ventricular contraction.
-
T Wave: Represents ventricular repolarization, the electrical recovery process before the next heartbeat.
-
QT Interval: Represents the total duration of ventricular depolarization and repolarization. A prolonged QT interval may be associated with an increased risk of dangerous ventricular arrhythmias, including torsades de pointes.
These measurements help doctors assess whether electrical impulses are traveling normally through the heart.
Types of Electrocardiogram (ECG) Tests
A standard ECG records heart activity over a short period.
However, because some cardiac abnormalities occur intermittently, other monitoring methods may be needed.
1. Standard ECG (12-Lead ECG)
A standard 12-lead ECG is a quick examination performed in a clinic or hospital while the patient is resting.
It records the heart's electrical activity for several seconds.
This test is commonly used to identify persistent rhythm abnormalities, conduction disorders, and certain acute cardiac conditions.
2. Holter Monitor
A Holter monitor is a portable recording device typically worn for 24–48 hours, although some monitoring systems can record for longer periods.
It continuously records the heart's electrical activity during normal daily activities, including sleeping, working, and exercising.
Holter monitoring can help detect intermittent arrhythmias that may not appear during a short standard ECG recording.
Research has demonstrated its diagnostic value in selected patients experiencing palpitations or suspected episodic rhythm disturbances.
Related Article: What Is a Normal Heart Rate? How to Measure It and When to Be Concerned
3. Event Monitor
An event monitor is another portable device used to record heart rhythm over an extended period, sometimes for up to 30 days.
Depending on the device, recording may be activated when the patient experiences symptoms, such as palpitations, or automatically when the device detects an abnormal rhythm.
This type of monitoring can be useful when symptoms occur less frequently and may not be captured by a standard ECG or short-term Holter recording.
4. Exercise Stress Test
An exercise ECG stress test records the heart's electrical activity while the patient performs physical exercise, such as walking on a treadmill or cycling on a stationary bicycle.
The examination assesses how the heart responds to physical exertion and increased oxygen demand.
In selected patients, it may help doctors evaluate suspected coronary artery disease, exercise-related rhythm abnormalities, and functional exercise capacity.
Who Needs an Electrocardiogram (ECG)?
An ECG may be recommended for people experiencing certain symptoms or medical conditions, including:
-
Chest pain or suspected angina.
-
Dizziness or fainting (syncope).
-
Palpitations or an unusually fast heartbeat.
-
Unexplained shortness of breath.
-
Extreme fatigue or reduced exercise tolerance.
-
A family history of coronary artery disease or arrhythmias.
-
Use of a pacemaker or ongoing treatment for heart disease.
-
Cardiovascular risk factors, such as diabetes, hypertension, or high cholesterol, when an ECG is clinically indicated.
Not everyone with cardiovascular risk factors needs routine ECG screening. The decision depends on symptoms, medical history, and the doctor's assessment.
How to Prepare for an Electrocardiogram (ECG)
Preparation for a standard resting ECG is generally simple.
The following steps can help ensure a smooth examination and accurate recording.
1. Ask About Caffeine and Other Stimulants
For a standard resting ECG, fasting or avoiding caffeine is generally not required unless your healthcare provider gives specific instructions.
However, caffeine and other stimulants may temporarily affect heart rate or cause palpitations in some people.
If you are scheduled for an exercise stress test, you may receive additional instructions regarding caffeine, food, or beverages before the examination.
Follow the preparation instructions provided by your healthcare team.
2. Avoid Applying Lotion or Oil
On the day of the examination, avoid applying lotions, oils, powders, or heavy creams to the chest and other areas where electrodes may be placed.
These products can interfere with electrode adhesion and electrical signal quality.
Poor electrode contact may produce recording artifacts that make the ECG more difficult to interpret.
3. Inform Your Doctor About Medications
Tell your doctor or healthcare professional about all medications, vitamins, and herbal supplements you are currently taking.
Some substances may influence heart rate, rhythm, or electrical conduction.
Examples include:
-
Heart medications, such as beta-blockers, digoxin, and antiarrhythmic drugs.
-
Certain antidepressants or antipsychotic medications.
-
Certain antibiotics, including macrolides and fluoroquinolones.
-
Herbal products containing stimulants, such as ephedra.
Providing an accurate medication history helps the doctor interpret your ECG findings appropriately.
Do not stop taking prescribed medication unless your doctor specifically instructs you to do so.
4. Wear Comfortable Clothing
During the examination, you may be asked to remove or adjust clothing around your upper body so electrodes can be attached to your chest.
A hospital gown may be provided.
Choose comfortable clothing that allows easy access to the chest, wrists, and ankles.
You may also be asked to remove certain accessories if they interfere with electrode placement.
Related Article: 10 Heart Hospitals in Jakarta: Services, Facilities, and Addresses
Electrocardiogram (ECG) Procedure: 4 Main Steps
A standard resting ECG usually takes less than 10 minutes to complete, although the actual recording lasts only a few seconds.
The examination provides important information about the heart's electrical activity.
ECG interpretation requires appropriate clinical knowledge and experience. Research has shown that interpretation accuracy varies among physicians and can improve with structured training.
The following are the four main steps involved in an ECG examination.
1. Initial Preparation
You will be asked to lie comfortably on an examination bed.
You may need to change into a hospital gown or adjust your clothing to allow access to the chest.
A healthcare professional will clean the areas where electrodes will be attached, including the chest and limbs.
If there is thick hair on the chest, a small area may be shaved to ensure proper electrode contact.
2. Electrode Placement
For a standard 12-lead ECG, a healthcare professional typically places 10 electrodes on the body:
-
Six electrodes on the chest.
-
Four electrodes on the limbs.
These electrodes generate 12 electrical views, or leads, of the heart.
Each electrode is connected to the ECG machine through a cable or recording system.
The electrodes detect electrical signals through the skin.
Conductive gel may be used when needed to improve contact and recording quality.
3. Recording the Heart's Electrical Activity
During the recording, you will be asked to remain still, breathe normally, and avoid talking.
Movement, talking, or shivering can introduce electrical interference or artifacts into the ECG tracing.
The machine records the heart's electrical signals and displays them as waveforms representing different phases of the cardiac cycle.
4. After the Examination
Once the recording is complete, the electrodes will be carefully removed.
You can usually return to your normal activities immediately.
The ECG results appear as a graphical tracing showing the heart's electrical activity.
If the results are normal, the recording may indicate that the heart rate, rhythm, and measured electrical intervals are within expected limits at the time of testing.
However, a normal ECG does not rule out all forms of heart disease, particularly conditions that occur intermittently.
If abnormalities are detected, including changes in the ST segment, T wave, or QT interval, your doctor may recommend additional testing.
Possible follow-up examinations include:
-
Cardiac blood tests.
-
Echocardiography.
-
Coronary angiography or other cardiac imaging, when clinically indicated.
Related Article: Leading Cardiologists in Jakarta and Indonesia
Side Effects of an Electrocardiogram (ECG)
A standard resting ECG is generally painless and has very few side effects.
Possible minor or temporary effects include:
-
Mild discomfort when adhesive electrodes are removed.
-
Temporary redness or mild skin irritation.
-
Adhesive residue or conductive gel remaining on the skin.
-
Minor discomfort from lying still during the examination.
-
Nervousness or temporary palpitations associated with anxiety.
-
Rare allergic reactions to electrode adhesives.
Most of these effects are mild and resolve without specific treatment.
Risks and Complications of an Electrocardiogram (ECG)
A standard resting ECG is considered a very safe diagnostic test.
It is non-invasive and does not involve radiation, needles, or electrical current being delivered into the body.
The electrodes only detect the heart's existing electrical signals.
Possible minor effects include:
-
Mild skin irritation from electrode adhesives.
-
Rare allergic reactions to adhesive materials or conductive gel.
-
Temporary discomfort or anxiety during the examination.
An exercise ECG stress test has additional considerations because it involves physical exertion.
Some patients may experience:
-
Fatigue.
-
Shortness of breath.
-
Chest discomfort.
-
Changes in blood pressure or heart rhythm.
Serious complications during properly supervised stress testing are uncommon, but the procedure should be performed under appropriate medical supervision.
When Should You See a Doctor?
Heart health is an essential part of long-term well-being.
If you experience symptoms that may indicate a heart problem, or if a previous ECG shows an abnormal result, consult a cardiologist for further evaluation.
Although an ECG can identify many cardiac abnormalities, its usefulness as a stand-alone screening test for heart disease is limited.
A comprehensive cardiac assessment may require medical history, physical examination, blood tests, imaging, or additional heart monitoring.
Tzu Chi Hospital PIK provides comprehensive cardiology services supported by modern diagnostic technology and experienced medical professionals.
You can also consider a medical checkup based on your individual health needs and your doctor's recommendations.
To find a cardiologist, please use the Find a Doctor feature on the official Tzu Chi Hospital PIK website.
For convenient consultation scheduling and appointments, you can also contact Tzu Chi Hospital through WhatsApp.
If you experience severe chest pain, sudden shortness of breath, or fainting with concerning symptoms, seek emergency medical attention immediately rather than waiting for a routine appointment.
Medically reviewed by dr. Stephanie Salim, Sp.JP.
References
-
An Evidence-Based Review of the Resting Electrocardiogram as a Screening Technique for Heart Disease. (2001). American Journal of Medicine, 110(4), 314–319.
-
Cook, D. A., Oh, S. Y., & Pusic, M. V. (2020). Accuracy of Physicians' Electrocardiogram Interpretations: A Systematic Review and Meta-Analysis. JAMA Internal Medicine, 180(11), 1461–1471.
-
Paudel, B., Sharma, D., & Bhandari, R. (2013). Diagnostic Significance of 24-Hour Holter Monitoring in Patients with Palpitation. Journal of Nepal Health Research Council, 11(24), 278–281.
