Trying to figure when it happen

So I had my period December 8-12 but in January my period came early 3-5 and on January 17 I took two test and found out I was expecting but still trying to figure out how far I am and when did it happen