Respiratory rate (RR) is a critical vital sign used to assess pulmonary function. Currently, RR estimating instrumentation is specialized and bulky, therefore unsuitable for remote health monitoring. Previously, RR was estimated using proprietary software that extract surface electrocardiogram (ECG) waveform features obtained at several thoracic locations. However, developing a non-proprietary method that uses minimal ECG leads, generally available from mobile cardiac monitors is highly desirable. Here, we introduce an open-source and well-documented Python-based algorithm that estimates RR requiring only single-stream ECG signals. The algorithm was first developed using ECGs from awake, spontaneously breathing adult human subjects. The algorithm-estimated RRs exhibited close linear correlation to the subjects’ true RR values demonstrating an R2 of 0.9092 and root mean square error of 2.2 bpm. The algorithm robustness was then tested using ECGs generated by the ischemic hearts of anesthetized, mechanically ventilated sheep. Although the ECG waveforms during ischemia exhibited severe morphologic changes, the algorithm-determined RRs exhibited high fidelity with a resolution of 1 bpm, an absolute error of 0.07 ± 0.07 bpm, and a relative error of 0.67 ± 0.64%. This optimized Python-based RR estimation technique will likely be widely adapted for remote lung function assessment in patients with cardiopulmonary disease.