An electrocardiogram (ECG or EKG), is a device that measures the heart’s electrical signals. This test is done to diagnose heart problems and check heart health.