Stomach cancer is usually found through an upper endoscopy, a procedure where a doctor passes a thin, flexible camera through your mouth and into your stomach to look directly at the lining. If anything looks abnormal, small tissue samples are taken during the same procedure and sent to a lab for analysis. This combination of visual inspection and biopsy is the primary way stomach cancer is diagnosed, but several other tests play important roles in building the full picture.
What Happens During an Upper Endoscopy
An upper endoscopy typically takes 15 to 30 minutes. You’ll receive a sedative through a vein in your arm to keep you relaxed and comfortable, and a numbing spray may be applied to your throat before the scope is inserted. A tiny camera on the tip of the scope sends a live video feed to a monitor, letting the doctor examine the entire lining of your esophagus, stomach, and upper small intestine in real time.
The doctor is looking for specific visual clues: patches of unusual redness or whitish discoloration, irregular surfaces with small raised bumps or shallow depressions, spontaneous bleeding, and abnormal folds in the stomach lining. These are the hallmarks of early gastric cancer. Some endoscopes use a specialized blue-light imaging mode that enhances the contrast of surface patterns, making it easier to spot small, flat cancers that might blend in under normal white light. This enhanced imaging has accuracy and specificity rates above 90% for detecting certain types of early stomach cancer.
If a suspicious area is found, the doctor takes tissue samples (biopsies) during the same procedure using a tiny tool passed through the scope. Guidelines traditionally recommend six to eight samples from a suspected cancerous lesion, though research has shown that three or four well-targeted samples from viable tissue can be enough for an accurate diagnosis in advanced cases. You won’t feel the biopsies being taken.
Recovery After the Procedure
After the endoscopy, you’ll rest in a recovery area for about an hour while the sedation wears off. You may feel alert fairly quickly, but your reaction time and judgment can stay impaired for hours. You’ll need someone to drive you home, and most people take the rest of the day off. Biopsy results typically come back within a few days to a week.
Testing for H. Pylori Infection
A bacterial infection called H. pylori is the single biggest risk factor for stomach cancer, and testing for it is a routine part of the diagnostic workup. The most common non-invasive options are a breath test and a stool antigen test. For the breath test, you swallow a small amount of a special substance, and the lab detects byproducts in your breath that signal the bacteria’s presence. Stool tests look for H. pylori proteins directly. Blood tests exist but are less commonly used because they detect antibodies that can linger long after an infection has cleared. If biopsies are taken during an endoscopy, those tissue samples can also be checked for H. pylori directly.
How Doctors Determine the Stage
Once a biopsy confirms cancer, the next step is figuring out how far it has spread. This process, called staging, uses several tools in combination.
Endoscopic ultrasound (EUS): A small ultrasound probe is attached to the tip of an endoscope and placed right next to the tumor. This lets doctors see the layers of the stomach wall in detail and measure how deeply the cancer has grown. EUS is particularly good at distinguishing cancers that remain in the surface layer (which may be treatable without major surgery) from those that have invaded deeper. It can also identify enlarged lymph nodes near the stomach and, using a fine needle passed through the scope, take samples from those nodes to check for cancer cells.
CT scan: A contrast-enhanced CT of the chest, abdomen, and pelvis is standard. It creates detailed cross-sectional images that help identify whether cancer has spread to the liver, lungs, or distant lymph nodes. CT is the workhorse of staging because it covers a large area quickly and reliably.
PET-CT scan: This scan highlights areas of unusually high metabolic activity, which can reveal cancer deposits that a CT alone might miss. In one large study, PET-CT identified unsuspected metastases in about 7% of patients whose CT scans had not shown distant spread. The most common surprise findings were cancer in the peritoneum (the membrane lining the abdomen), liver, distant lymph nodes, and in one case, bone.
Staging Laparoscopy
For cancers that appear to be at a more advanced local stage but haven’t shown up as spread on imaging, doctors often recommend a small surgical procedure called a staging laparoscopy. Under general anesthesia, a surgeon makes a few tiny incisions in the abdomen and inserts a camera to visually inspect the surfaces of the liver, peritoneum, and other organs. The surgeon also washes the abdominal cavity with fluid and sends it to a lab to check for loose cancer cells, a sign of microscopic spread that no scan can detect.
This step matters because imaging misses peritoneal spread surprisingly often. Research shows staging laparoscopy can detect hidden metastatic disease in up to three out of five patients whose scans looked clean. Major cancer organizations in the U.S., Europe, and Japan all recommend it for patients with locally advanced disease who are being considered for surgery or chemotherapy, though the exact criteria vary slightly by guideline.
Biomarker Testing on the Tumor
After a diagnosis, the biopsy tissue goes through additional molecular testing that helps guide treatment decisions. This step doesn’t change the diagnosis itself, but it determines which therapies are most likely to work.
- Microsatellite instability (MSI): All newly diagnosed stomach cancers should be tested for this. Tumors that are MSI-high have a specific type of DNA repair defect that makes them respond well to immunotherapy drugs.
- HER2: About 10 to 20% of stomach cancers overproduce a protein called HER2 on their surface, which can be targeted with specific medications. Testing is recommended when the cancer is advanced or has spread.
- PD-L1: This protein on the tumor surface helps predict whether immunotherapy will be effective. Testing is recommended for advanced, recurrent, or metastatic cases.
- Claudin 18.2: A newer biomarker now included in guidelines for advanced disease. Tumors that express this protein may benefit from a targeted therapy recently added to treatment options.
These tests are typically run on the same biopsy tissue that was used for the original diagnosis, so you don’t usually need a separate procedure.
Blood-Based Tests on the Horizon
Researchers are developing blood tests, sometimes called liquid biopsies, that can detect fragments of tumor DNA circulating in the bloodstream. In stomach cancer, these tests have shown promise for catching recurrences earlier than traditional scans and for monitoring whether treatment is working in real time. Circulating tumor DNA is currently the most developed of these markers and is already being used in some settings to detect minimal residual disease after surgery. These blood-based approaches are not yet standard for initial diagnosis, but they are increasingly part of follow-up care for patients who have already been treated.

