The sympathetic nervous system fight-or-flight response is characterized by a rapid increase in heart rate, which is mediated by an increase in the spontaneous action potential (AP) firing rate of pacemaker cells in the sinoatrial node. Sympathetic neurons stimulate sinoatrial myocytes (SAMs) by activating β adrenergic receptors (βARs) and increasing cAMP. The funny current (If) is among the cAMP-sensitive currents in SAMs. If is critical for pacemaker activity, however, its role in the fight-or-flight response remains controversial. In this study, we used AP waveform analysis, machine learning, and dynamic clamp experiments in acutely isolated SAMs from mice to quantitatively define the AP waveform changes and role of If in the fight-or-flight increase in AP firing rate. We found that while βAR stimulation significantly altered nearly all AP waveform parameters, the increase in firing rate was only correlated with changes in a subset of parameters (diastolic duration, late AP duration, and diastolic depolarization rate). Dynamic clamp injection of the βAR-sensitive component of If showed that it accounts for ∼41% of the fight-or-flight increase in AP firing rate and 60% of the decrease in the interval between APs. Thus, If is an essential contributor to the fight-or-flight increase in heart rate.