Preg test

When is the earliest you can take a pregnancy test? _DPO?