Is my pregnancy dated from my last period?

I took a pregnancy test this morning, it said I was 1-2 weeks pregnant. When updating my details, the app asked when my last period was, which was January 23rd (my periods are irrrgular) so now the app thinks I’m 5 weeks pregnant.. is my pregnancy based off my last period or when I ovulated? It’s so confusing!