The Short Answer:
Stomach cramps on the upper right side most often come from trapped gas, indigestion or a strained muscle. But gallstones, liver, kidney and ulcer problems can feel similar, so the pattern of your pain matters as much as the spot. Fever, yellow skin or eyes, or sudden severe pain are emergencies.
Introduction
One evening a friend of mine, Haroon, rang me: “It feels like a fist under my right ribs. It’s just gas, right?” I wanted to say yes. But I realised I couldn’t even name everything that sits on that side of the body, and stomach cramps upper right side can mean very different things.
So I started researching, then talked to two more people who had been through it. This is what I learned: eight causes, the pattern that tells them apart, and the red flags. If you are searching stomach cramps upper right side at an anxious hour, this is for you.
Table of Contents
The Phone Call That Sent Me Looking
What Haroon Described
Haroon is not a dramatic man. He told me the cramp had started after dinner, sat just under his right ribs, and came in tightening waves for about an hour. He had eaten late, a rich meal after a long, tense week at work, and had been lying on the sofa checking his phone with growing worry.
He asked me three things: what could it be, how long should he wait, and should he be scared? I’m not a doctor, so I couldn’t diagnose him, but I could help him ask better questions. The first was simple: what organs even live there?
Why I Didn’t Just Say “It’s Gas”
Gas was the most likely answer, and I did tell him that. But I had also heard Auntie Shaheen, my neighbour, describe a pain in almost exactly the same place that turned out to be something quite different. Same spot, different cause. That made me cautious about guessing from location alone.
That is the lesson that shaped this whole article: location narrows the list, but the pattern picks the winner. So I sorted the causes, learned what separates them, and noted the signs that mean you shouldn’t wait. Here is everything I found.
What’s in the Upper Right Abdomen
The Organs Under Your Right Ribs
The upper right abdomen isn’t just “the stomach”. Under those ribs sit your liver, your gallbladder, part of your right kidney, part of the stomach and a bend of the large bowel. The base of the right lung rests just above. Any of them can send out a pain signal that feels like a cramp.
That is oddly reassuring. A cramp here doesn’t point to one organ; it points to a neighbourhood. Most of the time that neighbourhood is dealing with something ordinary like gas or a strained muscle, but it is also home to organs that deserve a proper look if the pain doesn’t behave.
Why Pain Here Is Hard to Pin Down
Pain isn’t always felt where it starts. Organs share nerve pathways, so a problem under your ribs can show up in your back or shoulder, and a sore muscle in the stomach wall can feel as though it comes from deep inside. This is called referred pain.
I saw it with Auntie Shaheen, whose pain spread toward her shoulder blade, and with Sana, a friend of a friend, who was certain her pain came from an organ when it was actually her ribs. It is why googling a single symptom rarely works.
Stomach Cramps Upper Right Side: How to Read Yours
Timing, Food and Position
Start with timing. Does it come after meals, especially rich or fatty ones, or at night? Does it ease when you pass wind, move around or change position? Pain that follows food points toward the gut or gallbladder, while pain that changes with movement or breathing often points to a muscle or rib.
I gave Haroon a simple job: write down when it started, how long it lasted and what he had eaten. Two minutes of notes told us more than an hour of guessing, and they are exactly what a GP will ask for if you go.
Where It Travels and What Comes With It
Next, notice where the pain goes and what else shows up. Spreading to the back or shoulder blade, fever, feeling sick, dark urine, pale stools or yellowing of the skin and eyes all change the picture. A cramp on its own is very different from a cramp with a temperature.
Here is the rough guide I made from my notes. It is a clue, not a diagnosis, and it is no substitute for a GP.
| What the pain is like | What it may suggest |
| Comes and goes, eases with wind or movement | Trapped gas |
| Heavy or burning after a big meal | Indigestion or reflux |
| Sore to press, worse with movement | Muscle strain |
| Sharp, worse with breathing or twisting | Rib cartilage pain |
| Waves after rich food, spreads to shoulder | Gallstones |
| Dull ache, tiredness, yellow skin | Liver problem |
| Sharp toward the back, urine changes | Kidney stone or infection |
| Gnawing or burning, linked to meals | Stomach ulcer |
Four Common, Usually Harmless Causes
These four are what most people with this pain turn out to have, but each one has a catch.
Cause 1: Trapped Gas and Constipation
This was Haroon’s most likely answer. The large bowel bends right under the ribs on this side, so gas or stool trapped at that bend can cause sharp, cramping pain that feels frightening but passes. It usually eases when you pass wind, move around or have a bowel movement. A gentle walk often helps it along, which is exactly what I suggested to Haroon first.
If constipation is part of your story, my article on what causes constipation covers the hidden triggers, and some people find certain fruits set gas off, which I explain in why grapes give you gas. Gas pain that keeps returning deserves a GP’s attention, not a shrug.
Cause 2: Indigestion and Acid Reflux
A heavy, late or rushed meal can leave an ache or burn in the upper abdomen that spreads a little to the right. Haroon’s dinner was both late and rich, so this was high on my list for him. Lying down soon after eating tends to make it worse.
Triggers vary, but spicy, fatty and very large meals are the usual suspects, and I have listed the worst foods for acid reflux in a separate guide. If indigestion keeps coming back or wakes you at night, mention it to your GP.
Cause 3: Muscle Strain
A pulled muscle in the stomach wall, from exercise, a twist or a hard cough, can ache like a cramp even though no organ is involved. The big clue is that pressing on the sore spot reproduces the pain and movement makes it worse, rather than food. Try gently tightening your stomach muscles or sitting up from lying down: if that sets the pain off, a muscle is a likely source.
Haroon had spent the weekend carrying boxes while moving a sofa, and he had forgotten all about it until we talked. Rest and gentle movement usually settle a strain, but pain that is getting worse rather than better needs a proper check.
Cause 4: Rib Cartilage Pain (Costochondritis)
Sana, the friend of a friend, swore her pain was her gallbladder. She had started a new gym routine two weeks earlier, and the pain was sharp and tender when she pressed on her lower ribs. Her GP told her it was costochondritis, inflammation of the cartilage that joins the ribs to the breastbone.
It surprised me how convincingly it mimics an organ problem. The pain tends to worsen with deep breaths, coughing or twisting, not with eating. Because pain around the chest can have other causes, I would never self-diagnose this one, especially if you also feel breathless.
Four Causes That Need a Doctor
These are the ones I would never try to guess my way through.
Cause 5: Gallstones and Gallbladder Inflammation
Auntie Shaheen described it to me over the garden wall: “It felt like someone was squeezing me from the inside.” The pain hit under her right ribs after a rich meal, came in waves for a couple of hours and spread toward her shoulder blade. Unlike gas, it didn’t ease when she passed wind or went to the toilet. That is a classic gallstone pattern: pain lasting from about half an hour to several hours, sometimes spreading to the back or shoulder.[1]
Her GP arranged an ultrasound, but while she waited, something changed, which I will come back to in the red flags. If this sounds like you, my guides to gallbladder friendly foods and gallbladder removal recovery explain what can come next.
Cause 6: Liver Conditions
The liver can also cause a dull, steady ache under the right ribs, usually alongside tiredness, loss of appetite, nausea or yellowing of the skin and eyes. It is far less common than gas or muscle strain, and it tends to build over days or weeks rather than arriving in waves. If you drink alcohol regularly or take any regular medicines, tell your GP, because both matter when the liver is in question.
Because liver problems can stay quiet for a while, a pain that lingers is exactly the kind worth testing. My article on the warning signs of jaundice and liver failure explains which symptoms should never be ignored.
Cause 7: Kidney Stones and Infection
The right kidney sits toward the back of the upper right abdomen. A stone or infection there usually causes sharp pain in waves that moves toward the back, side or groin, sometimes with changes in urination, blood in the urine or a fever.
If pain on this side comes with burning when you pee, a temperature, or a feeling of being properly unwell, treat it as a same-day issue. Kidney pain is often felt further round the back than gallbladder pain, which is one useful clue.
Cause 8: Stomach (Peptic) Ulcer
A stomach or duodenal ulcer causes a gnawing or burning pain in the upper abdomen that is often linked to meals, sometimes easing with food and sometimes getting worse. Black stools or vomiting blood are warning signs that need urgent medical help. Regular painkillers such as ibuprofen are a well-known trigger, so tell your GP what you take.
There are rarer causes too, such as shingles, where one-sided pain can come before a rash, and chest infections near the base of the lung. That is one more reason I would rather you ask a professional than try to rule things out from a list.
Red Flags: When It’s an Emergency
Go to A&E or Call 999
While Auntie Shaheen waited for her ultrasound, her pain changed one night. She developed a fever with shivering, and the whites of her eyes looked yellow. Her daughter called 999 straight away, and I am so glad she did, because that combination can mean a stone is blocking a duct or the gallbladder is infected.
Call 999 or go to A&E if you have sudden, severe tummy pain, pain that spreads to your back while you are being sick, a very high temperature or feel hot, cold and shivery, or yellow skin or whites of the eyes.[2] Do not drive yourself. Chest pain or difficulty breathing alongside the pain also needs a 999 call.
That is the lesson I took from her: the cramp itself matters less than what travels with it. She was treated in hospital and is doing well now, and she tells everyone she knows not to wait it out.
Book a GP Visit Soon
Not every worry is an emergency. Book a GP appointment if the pain keeps coming back, lasts more than a few days, wakes you at night, or comes with weight loss or a change in appetite or bowel habits. NHS 111 can also help if you are unsure how urgent it is.
Anxiety can make this tricky, because worry itself can cause tension in the chest and stomach, as I explain in my article on anxiety and chest pain. But that is never a reason to skip a check. If you are worried enough to be reading this, a GP can settle it.
What Happens at the GP
Haroon finally saw his GP because the cramp returned twice that week. He was asked where it hurt, how long it lasted, what he had eaten, whether it spread and how he had been feeling. The GP pressed gently around his ribs, and Haroon told me one tender spot matched his pain exactly.
If the story and exam don’t explain it, doctors can order blood tests to check the liver and infection, a urine test for the kidney, or an ultrasound to look at the gallbladder and liver. In Haroon’s case none of that was needed: the conclusion was indigestion with a strained stomach wall, made worse by a stressful week. He had also taken a list of his medicines and supplements with him, which is worth doing, because some can irritate the stomach or affect the liver.
What Helped Haroon While Waiting
A few small changes helped, and none of them are treatment. He ate dinner earlier and smaller, took a ten-minute walk afterwards, and cut back on the rich takeaways he had been leaning on during the stressful week.
He also noticed how much tension fed into it. My piece on how stress tightens the body explains the link, and if your cramps tend to arrive at dawn instead, I have written about stomach cramps in the morning too. The real habit he kept was noticing patterns and acting when one changed.
Conclusion
So, what lies behind stomach cramps upper right side? Usually gas, indigestion or a strained muscle, sometimes rib cartilage, and less often the gallbladder, liver, kidney or an ulcer. Haroon, Auntie Shaheen and Sana each had a different answer to the same cramp.
What I took away is that the pattern tells you more than the location: the timing, food, movement, what spreads, and what travels along with it. Pay attention, don’t panic, and don’t wait if fever, yellow skin or severe pain appear. I’m not a doctor, but I now know which questions to ask.
This article is for general information only and isn’t medical advice. If you have severe, persistent or worsening abdominal pain, please seek medical help promptly.
Frequently Asked Questions
What causes stomach cramps on the upper right side?
Most often trapped gas, indigestion or a strained muscle, though gallstones, liver, kidney and ulcer problems can cause similar pain.
Is upper right abdominal pain always the gallbladder?
No, gas, indigestion and muscle strain are far more common, although the gallbladder is one important possible cause.
Can gas cause pain under the right ribs?
Yes, gas trapped in the bend of the large bowel under the right ribs can cause sharp cramps that ease when you pass wind or move around.
When is upper right stomach pain an emergency?
Call 999 or go to A&E for sudden severe pain, fever with shivering, yellow skin or eyes, or pain spreading to your back while you are being sick.
When should I see a doctor for upper right pain?
See a GP if it keeps coming back or lasts more than a few days, and call NHS 111 the same day if the pain is strong and not settling.
3 thoughts on “Stomach Cramps Upper Right Side: 8 Causes and Red Flags”