What Causes Stones in the Gallbladder to Form?

Gallstones form when substances in bile, the digestive fluid stored in your gallbladder, fall out of balance and harden into solid deposits. About 15% of adults in the United States have gallstones, and prevalence across Europe ranges from 9% to 21%. Most gallstones are made primarily of cholesterol, but a smaller portion are pigment stones made from bilirubin, a waste product from broken-down red blood cells. The underlying cause depends on which type you develop.

How Cholesterol Stones Form

Your gallbladder stores bile, a fluid your liver produces to help digest fats. Bile contains cholesterol, bile salts, and fatty compounds called phospholipids. Normally, the bile salts and phospholipids keep cholesterol dissolved in the fluid, much like soap keeps grease dissolved in water. Problems start when the ratio tips: either your liver pumps too much cholesterol into bile, or there aren’t enough bile salts to keep it dissolved.

When cholesterol exceeds what the fluid can hold, it’s called supersaturation. Tiny cholesterol crystals begin forming, a process known as nucleation. Under normal conditions, your gallbladder contracts after meals and flushes bile into your intestine before crystals can grow. But many people who develop stones also have sluggish gallbladder emptying. The bile sits longer than it should, giving those microscopic crystals time to clump together, layer on more cholesterol, and grow into stones that can range from a grain of sand to a golf ball.

What Causes Pigment Stones

Pigment stones come in two distinct varieties, and their causes are completely different from cholesterol stones.

Black Pigment Stones

Black stones form in sterile bile when the liver secretes too much bilirubin. This happens in conditions that destroy red blood cells faster than normal: sickle cell disease, thalassemia, hereditary spherocytosis, malaria, and even the subtle red blood cell damage caused by prosthetic heart valves or long-distance running. Liver cirrhosis with an enlarged spleen can also accelerate red blood cell breakdown. The excess bilirubin combines with calcium in the bile and precipitates into dark, hard stones.

Brown Pigment Stones

Brown stones require a bacterial infection somewhere in the biliary system. When bacteria from the colon colonize the bile ducts, they produce enzymes that break down bilirubin and phospholipids into insoluble fragments. Those fragments combine with calcium and fatty acids to form soft, muddy, brownish stones. Brown stones are strongly associated with bile duct obstruction, stagnant bile flow, and in parts of Southeast Asia, parasitic infections from liver flukes and roundworms.

Hormones and Sex Differences

Women develop gallstones roughly twice as often as men, and estrogen is the primary reason. Estrogen increases the amount of cholesterol the liver secretes into bile, directly pushing bile toward supersaturation. This effect is amplified during pregnancy, when estrogen levels surge, and with the use of oral contraceptives or hormone replacement therapy. Progesterone compounds the problem by slowing gallbladder contractions, which means bile sits longer and crystals have more opportunity to form. The combination of more cholesterol in the bile and a sluggish gallbladder is why gallstone risk climbs during a woman’s reproductive years and especially during pregnancy.

Genetics and Family History

Gallstones run in families, and researchers have identified specific genetic reasons why. Variations in the ABCG8 gene, which controls a protein that pumps cholesterol from the liver into bile, can cause that protein to work in overdrive. The result is more cholesterol entering bile than the fluid can dissolve. People who carry these gene variants face a measurably higher risk of cholesterol stones regardless of their diet or weight. Indigenous populations in the Americas have some of the highest gallstone rates in the world, a pattern that reflects inherited differences in cholesterol metabolism passed down over generations.

Weight, Dieting, and Metabolism

Carrying excess weight is one of the strongest risk factors for cholesterol gallstones, particularly for women. Obesity increases the amount of cholesterol your liver produces and secretes into bile. But losing weight too quickly can be just as risky as staying overweight. When you lose weight rapidly, whether through very low calorie diets or bariatric surgery, your liver releases extra cholesterol into bile at the same time your gallbladder stops emptying as effectively. That combination creates ideal conditions for crystal formation.

Prolonged fasting triggers a similar mechanism. When you don’t eat for long stretches, the gallbladder never receives the hormonal signal to contract and empty. Bile stagnates, and cholesterol crystals start to form. This is why gallstone problems are common in the months following weight-loss surgery, and why gradual weight loss (one to two pounds per week) carries less risk than aggressive approaches.

Diet and Gallstone Risk

What you eat influences how much cholesterol ends up in your bile and how well your gallbladder functions. Diets high in refined carbohydrates and sugar tend to increase cholesterol secretion into bile. A diet low in fiber appears to compound this by slowing intestinal transit, which affects how bile acids are recycled back to the liver.

A large cross-sectional study of U.S. adults found that every additional gram of dietary fiber consumed per day was associated with a 2% reduction in gallstone risk. People eating more than about 21 grams of fiber daily had a 35% lower risk of gallstones compared to those eating less than 10 grams. For context, the average American gets about 15 grams of fiber a day, which falls in the middle of that range. Fruits, vegetables, whole grains, and legumes all contribute meaningfully.

Coffee appears to be protective. A large study of women found that drinking four or more cups of caffeinated coffee per day was associated with a greater than 25% reduction in gallstone risk compared to drinking none. The benefit appeared to scale with intake, and it tracked specifically with caffeine rather than other compounds in coffee. Caffeine stimulates gallbladder contractions and may help keep bile moving, preventing the stagnation that leads to crystal growth.

Conditions That Disrupt Bile Circulation

Your body recycles bile acids through a loop: the liver makes them, the gallbladder stores them, they enter the intestine to help digest fat, and the end of the small intestine (the ileum) reabsorbs them back to the liver. Anything that interrupts this loop reduces the bile salt supply available to keep cholesterol dissolved.

Crohn’s disease frequently affects the ileum, which is precisely where bile acids are reabsorbed. When that segment is inflamed or has been surgically removed, bile acids are lost into the colon instead of being recycled. The liver can’t fully replace them, and bile becomes undersaturated with bile salts and oversaturated with cholesterol. Crohn’s patients also face a higher risk of pigment stones, possibly because bacterial overgrowth in the small intestine alters how bilirubin is processed and reabsorbed.

Liver cirrhosis increases the risk of black pigment stones through a different pathway. The enlarged spleen that accompanies cirrhosis traps and destroys red blood cells faster than normal, flooding the liver with bilirubin. At the same time, the damaged liver is less efficient at processing and conjugating bilirubin properly, so more of it ends up in bile in a form that readily precipitates into stones.

Age and Other Contributing Factors

Gallstone risk rises steadily with age. By age 60, roughly one in four women and one in ten men in Western countries have gallstones. The reasons are cumulative: years of cholesterol exposure, gradual decline in gallbladder motility, and the accumulated effects of the hormonal, genetic, and metabolic factors described above. Diabetes and insulin resistance independently increase risk by promoting cholesterol secretion into bile and reducing gallbladder contractility. Certain medications that lower blood cholesterol by diverting it into bile can paradoxically raise gallstone risk by supersaturating the bile with the very cholesterol they remove from the bloodstream.

Geography and ethnicity matter too. Gallstone prevalence is lowest in sub-Saharan Africa and parts of Southeast Asia, moderate in Japan (around 10%), and highest in Western countries and among Indigenous American populations. The global burden is growing as diets in traditionally low-risk regions shift toward higher fat, higher sugar, and lower fiber patterns.