Provided are a method and systems for measuring an electrocardiogram (ECG) using a wearable device. An example system includes the wearable device in a shape of a band worn on a limb (e.g., a wrist) of a patient. The wearable device includes an electrical sensor. The wearable device is operable to record, via the at least one electrical sensor, an electrical signal from the limb of the patient. The wearable device is operable to split the electrical signal into segments based on a reference signal. The reference signal includes an indication of onset times of heart beats. The segments are averaged to derive average ECG data of low signal-to-noise ratio. The wearable device includes an optical sensor operable to measure skin color beneath a pulsating artery of the limb. The reference signal includes a photoplethysmogram (PPG) signal recorded via the optical sensor simultaneously with the electrical signal.