File Exchange

image thumbnail

Heart rate/ SpO2 using PPG

version (5.38 KB) by T. Thinh Nguyen
Estimation of Heart rate and SpO2 level using PPG (Photoplethysmogram)


Updated 05 Oct 2015

View License

Estimation of SpO2 level and heart rate using PPG data. PPG is measured while the object stay still so no moving artifact involves. 940nm/ 660nm

Cite As

T. Thinh Nguyen (2021). Heart rate/ SpO2 using PPG (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

eva zita patai

Ubaid Khan

Bernardo Pereira

Does anyone know why the formula SpO2(n)=104 - 28*R?
I saw in some thesis and for what I understand this formula is the linear calibration. The theoretical expression is SpO2(n)=110 - 25*R.
I just don't know how do you obtain that expression (SpO2(n)=104 - 28*R).

sneha g

Can you reference the formula: SpO2(n) = 104 - 28*R ?

T. Thinh Nguyen

Since I have received a lot of emails asking similar questions about this code. I decide to publish some conversation on my blog so everyone can access quickly and I myself can avoid answering the same questions again and again.
Take a look at:

Thanks a lot!!

T. Thinh Nguyen

I gathered some shared code and ref. paper here



Ranjith Thottathil

the sample data given in this link is not working please help

Ranjith Thottathil

Ranjith Thottathil

Can you please give me the base paper for this work?

Pham Link

Can you reference the formula: SpO2(n) = 104 - 28*R ?

Yannick Riou


Thank you so much for providing your work on a public platform. I have a request, can you send me some more PPG samples or atleast send me the link from where I can download ppg data.

I have already checked but it contains only single Data ( either IR or RED data )

Looking forward for your reply

T. Thinh Nguyen

Dear Tran,

Version 1 is written in Matlab. Version 2( embedded) I wrote for the embedded system.

Tran Tuan Anh

Thank you so much for your code. There are two versions of heart rate and SPO2 estimation in your code. Please tell me what is the difference between them ??

Thank you so much.

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!