How early can I take a pregnancy test?

I know your supposed to wait until a missed period but could I take one earlier?