what is the best heart rate senor and it's accuracy?

I am working on a project to monitor a persons heart rate. I need to know which sensor would be the best one for my project. Also how accurate reading it can give and what are it's limitations Thank you.

The heart rate is measured as beats per minute, right? What is important in your project? Do you need to catch each heart beat and calculate the rate according to each interval between two beats? Or is it more important to have an average of say all beats during a 15 s time frame? Do you want to catch each skipped beat or each abnormal beat?

I believe the normal way of measuring a heart rate is to actually count the beats during a 60 s period. Or 30 s, or 15 s. And kind of get the "normal" rate and not let any abnormal beats affect the measurement. If that is true in your project, then you could measure the time between each registered beat, record the 20 last times and get an average from them. In case of abnormal beats or beats that your sensor misses, you could leave two or four times that differ the most from the over all average and calculate a new average. Or you could pick the median value of the 20 last times.

In this scenario you would have a sensor that only recognises a beat. It doesn't provide you with the final BPM value. That would be a task for your logic. The last days I've been testing the KY-039 sensor and I found out that the sensor itself is quite good for reading variations in the blood pressure in your fingertip. But turning that data into a BPM value requires a lot of analysing. Since that can be done in your Arduino, my guess is that that is the approach you should take. Have a sensor which catches the variations of the blood pressure, have your own logics which turn the data into BPM. Having a sensor which directly returns the BPM value locks your project to the unimproveable inner logics of the sensor.

Here's about my tests with KY-039.

Any sensor that works to your specifications is fine for your project.

Ask your local hospital. I'm sure they can suggest you some highly accurate and reliable heart rate monitors.