How Do You Get Gallstones: Causes and Risk Factors

Gallstones form when substances in your bile, most often cholesterol, become too concentrated and crystallize inside the gallbladder. About 6% of adults worldwide have them, with women affected more often than men (7.6% vs. 5.4%). The process is gradual: tiny crystals form first, get trapped in the thick mucus lining the gallbladder, and slowly grow and fuse into solid stones over months or years.

What Happens Inside the Gallbladder

Your liver produces bile, a digestive fluid that helps break down fats. Bile contains cholesterol, bile salts (natural detergents), and a fat called lecithin. These three substances normally keep each other in balance. Liver cells package cholesterol and lecithin into tiny bubble-like structures and release them into bile. Bile salts then dissolve those bubbles into smaller clusters that can hold cholesterol in a liquid state.

The gallbladder’s job is to store and concentrate bile by absorbing water and salts. This concentrating step is where things can go wrong. If the bile contains too much cholesterol relative to bile salts and lecithin, it becomes “supersaturated,” meaning it holds more cholesterol than the liquid can actually dissolve. The excess cholesterol precipitates out as microscopic crystals. Those crystals get trapped in gallbladder mucus, forming a thick sludge that eventually hardens into stones.

Cholesterol Stones vs. Pigment Stones

Roughly 80% of gallstones are cholesterol stones, which are yellowish-green and made primarily of hardened cholesterol. The remaining 20% are pigment stones, which are dark brown or black and form from excess bilirubin, a waste product created when your body breaks down old red blood cells. Conditions that increase bilirubin production, like liver cirrhosis, bile duct infections, and blood disorders such as sickle cell disease, raise the risk of pigment stones specifically.

Why Some People Are More Prone

Gallstone risk rises with age and is consistently higher in women, largely because of estrogen’s effects on bile chemistry. Estrogen increases the amount of cholesterol the liver secretes into bile and relaxes the gallbladder wall, making it contract less effectively. This double effect, more cholesterol plus slower emptying, creates ideal conditions for crystal formation. The same mechanism explains why pregnancy, hormone replacement therapy, and high-dose estrogen birth control pills all raise gallstone risk.

Geography and ancestry matter too. Prevalence reaches 11.2% in South America compared to 5.1% in Asia. Certain genetic variations also play a role. Changes in a gene called ABCG8, which controls a protein that pumps cholesterol into bile, can cause the transporter to push more cholesterol than normal into the biliary system, tipping the balance toward supersaturation.

Obesity is one of the strongest modifiable risk factors. Carrying excess body fat increases the cholesterol content of bile. Paradoxically, losing weight too quickly is also risky. During rapid weight loss, the gallbladder contracts less often, and bile sits stagnant for longer periods. This allows cholesterol and other substances to concentrate and crystallize. People on very low-calorie diets or recovering from bariatric surgery are particularly vulnerable to this effect.

Conditions That Increase Your Risk

Crohn’s disease, especially when it affects the lower part of the small intestine (the ileum), disrupts the recycling of bile salts. Normally, bile salts are reabsorbed in the ileum and sent back to the liver for reuse. When this loop is interrupted by inflammation or surgical removal of that section, the liver compensates by producing bile with a higher proportion of cholesterol relative to bile salts, which promotes stone formation.

Any situation that keeps the gallbladder from contracting regularly creates a stasis problem. Critically ill patients receiving nutrition through an IV are at elevated risk because the gallbladder has no food-triggered signal to squeeze and empty. Prolonged fasting has a similar, milder effect. Pregnancy compounds hormonal changes with the physical compression of abdominal organs, further slowing gallbladder emptying.

Medications That Can Trigger Stones

Several common medications increase gallstone risk through different mechanisms. Cholesterol-lowering drugs called fibrates and the cholesterol absorption blocker ezetimibe can shift more cholesterol into bile. The diabetes and weight-loss drug liraglutide is also associated with gallstone formation. Among the highest-risk medications are somatostatin analogues used for hormonal disorders: one of these drugs causes gallstones in up to 33% of users.

The injectable antibiotic ceftriaxone can cause gallbladder sludge even in children. This effect is usually reversible once the drug is stopped, but prolonged courses of three weeks or longer can produce actual stones. Certain HIV antivirals, particularly atazanavir, can also trigger stone formation.

How Diet Affects Stone Formation

Dietary fiber appears to have a protective effect. A large cross-sectional study using U.S. national health data found that people in the highest fiber intake group (above about 21 grams per day) had 35% lower odds of gallstone disease compared to those eating the least fiber (under 10 grams per day). Each additional gram of daily fiber was associated with a 2% reduction in risk. For context, a cup of cooked lentils has about 15 grams of fiber, and most Americans eat only 10 to 15 grams a day.

Diets high in refined carbohydrates and sugar increase the cholesterol saturation of bile, while moderate intake of healthy fats actually helps by stimulating the gallbladder to contract and empty regularly. The worst dietary pattern for gallstone risk is one that combines long gaps between meals (giving bile time to stagnate) with calorie-dense, low-fiber foods (raising cholesterol in bile). Eating regular meals with plenty of vegetables, legumes, and whole grains addresses both sides of that equation.

Why Most People Never Know They Have Them

Most gallstones are “silent,” meaning they sit in the gallbladder without causing symptoms. Problems start when a stone shifts and blocks the narrow duct that drains the gallbladder. This produces a sudden, intense pain in the upper right abdomen or between the shoulder blades, often after a fatty meal. Episodes typically last 30 minutes to several hours. If a stone blocks the duct for an extended period, it can lead to inflammation, infection, or more serious complications involving the pancreas or liver.

People who have had one painful episode have roughly a 70% chance of having another within two years, which is why surgery to remove the gallbladder is the standard treatment for symptomatic stones. Silent gallstones found incidentally on imaging generally don’t require treatment.