Sex determined by heartbeat?

Tomeka
Hello. This is my first pregnancy and I had a dr appointment today. I'm currently 16 weeks and will not get an ultrasound to determine the sex until next month. My baby's heartbeat was 140 today. The dr said that's more than likely a boy. How accurate is that? Just wondering!