An ectopic pregnancy is usually diagnosed by carrying out a transvaginal ultrasound scan.
This involves inserting a small probe into your vagina. The probe is so small that it's easy to insert and you won't need a local anaesthetic.
The probe emits sound waves that bounce back to create a close-up image of your reproductive system on a monitor.
This will often show whether a fertilised egg has become implanted in one of your fallopian tubes, although occasionally it may be very difficult to spot.
Blood tests to measure the pregnancy hormone human chorionic gonadotropin (hCG) may also be carried out twice, 48 hours apart, to see how the level changes over time.
This can be a useful way of identifying ectopic pregnancies that aren't found during an ultrasound scan, as the level of hCG tends to be lower and rise more slowly over time than in a normal pregnancy.
The results of the test can also be useful in determining the best treatment for an ectopic pregnancy.
Read more about how an ectopic pregnancy is treated.
If it's still not clear whether you have an ectopic pregnancy or the location of the pregnancy is unknown, a laparoscopy may be carried out.
This is a type of keyhole surgery carried out under general anaesthetic (where you're asleep) that involves making a small cut (incision) in your tummy and inserting a viewing tube called a laparoscope.
Your doctor uses the laparoscope to examine the womb and fallopian tubes directly.
If an ectopic pregnancy is found during the procedure, small surgical instruments may be used to remove it to avoid the possible need for a second operation later on.
Read more about surgery for an ectopic pregnancy.