How to calculate pregnancy weeks??

Could someone please tell me how pregnancy weeks work. The last time I had sex was Saturday 24th of June. I'm on the pill so don't know when I ovulated.

I had my period two weeks ago but it was lighter but I had a negative pregnancy test.

However, I am booked in to have an ultrasound to check to see why my period was lighter and why I have pain ect...

Anyone know how many weeks I would be? And if they would possibly see anything if I was pregnant.

It was requested as a pelvic ultrasound. They said I didn't need a vaginal one.

I'm worried I could be pregnant but the doctor said I doubt it and I forgot to ask him these questions. I was hoping someone could help me out!

IF IT TURNS OUT THAT IM NOT PREGNANT I WOULD STILL LOVE TO KNOW HOW YOU CALCULATE IT