pregnancy test??

How early can I take a pregnancy test if my last menstrual cycle ended on Oct 5 and was supposed to start on the 31st?