How early can you detect a heartbeat?

I had my first ultrasound today and by my calculations I'm exactly 6 weeks.  We saw the sac but nothing else. Dr. said was even unsure about seeing a yolk sac and we obviously didn't detect any heartbeat. I've been spotting for over a week with a reddish brown discharge and I'm just worried sick. How early can the heartbeat be detected? He pretty said things are inclonslsive and we'll do another ultrasound in a week. 😥