Gallstones are sometimes found by chance, for example during an ultrasound scan of the abdomen. But the doctor will often specifically look for them because you have symptoms that could be signs of gallstones. Before any diagnostic tests are done, it is important to describe your symptoms to the doctor in detail.
Diagnosing gallstones is normally not very complicated. After you have talked to the doctor, you will have a physical examination and an ultrasound scan of your abdomen. This will usually be enough to make a diagnosis. More tests may be necessary to make sure the symptoms aren't being caused by other medical problems.
Diagnosing gallstones located in the bile duct may be more complicated. If there is reason to believe you might have bile duct stones, an ultrasound scan will usually be done there, too. But because they are more difficult to spot on a normal ultrasound image, that might be followed up by an endoscopic ultrasound examination (endosonography). In this examination, an endoscope with an ultrasound probe is pushed through your food pipe, your stomach, and the first part of the duodenum, to the opening of the bile duct. Bile duct stones can then usually be seen well. You will be given a sedative (short anesthetic) before the examination.
In more rare cases, a diagnostic procedure called endoscopic retrograde cholangiopancreatography (ERCP) is performed. It is usually only used if doctors are very sure that there are stones in the bile duct. This also involves inserting an endoscope through the mouth and gently pushing it along the food pipe, stomach and into the duodenum, where the bile duct opening is found. The doctor will then inject a contrast agent into the duct so that any stones become visible on the x-ray image. With the help of the endoscope, the stones can then not only be detected but also removed during the examination.
Magnetic resonance cholangiopancreatography (MRCP) is another alternative. You then lie in a magnetic resonance scanner that generates layered images of the bile duct system from outside the body. A separate procedure is then needed if gallstones are found that have to be removed.