How long?!?

How long after a missed period are you supposed to wait to take a pregnancy test??? When is a pregnancy test the most accurate after a missed period.?