Knowing when you're pregnant

Taylor
Hey! I've been pregnant before and had a baby, but it was not planned, so my question is, when is the earliest you can know if your pregnant?