What Causes Kidney Stones?

Medically Reviewed by Jabeen Begum, MD on December 12, 2023
8 min read

infographic of kidney stones

You get kidney stones when your pee has a high concentration of minerals and other substances -- like calcium, oxalate, and uric acid -- that come together to make crystals. The crystals then stick together to make one or more hard deposits or "stones." This happens when your pee doesn't have enough fluid and other substances to keep the crystals from forming. 

A kidney stone can be as tiny as a grain of sand, and you can pass it without ever knowing you had it. But a bigger one can block the flow of your pee and hurt a lot. Some people say the pain can be worse than childbirth.

Different things can bring on kidney stones, including what you eat and certain medications.  They're more likely to affect men, but research shows the rate is increasing among women.   

What food can cause kidney stones?

No one type of food causes kidney stones. But if you've had the calcium oxalate type of kidney stones before, your doctor may ask you to avoid foods that contain oxalates. These are compounds found naturally in many plant foods, including: 

  • Nuts and peanuts
  • Soy foods, including tofu and soy milk
  • Spinach and other leafy greens
  • Rhubarb
  • Wheat bran

These foods are healthy for most people, so there's no need to cut them out unless your doctor tells you to.

If you've had uric acid kidney stones in the past, your doctor may suggest that you cut down on foods high in chemical compounds called purines. These include:

  • Alcoholic beverages
  • Organ meats
  • Red meat
  • Shellfish

Kidney stones can be made of several different substances. It's important to know the type of stone you have, so you can know what may have caused it and how to prevent stones in the future. If you pass a kidney stone, take it to your doctor so they can send it to the lab and find out what kind it is. 

You can have:

  • Calcium stones. Most kidney stones are made from calcium. There are two kinds of calcium stones:

    • Calcium oxalate. Oxalate is a substance your liver makes. You can also get it from some fruits and vegetables, as well as nuts and chocolate, in your diet. Other things that can concentrate calcium or oxalate in your pee are high doses of vitamin D, intestinal bypass surgery, and certain metabolic disorders.

    • Calcium phosphate. This type of stone happens more often in people with metabolic conditions, like renal tubular acidosis (where your kidneys aren't able to help maintain proper acid balance in your blood). They may also be more likely to affect those who take certain medications to treat migraines or seizures.

  • Struvite stones. These can form when you have a urinary tract infection (UTI). The bacteria that cause the infection make ammonia build up in your pee. This causes the stones to form. They can get large very quickly.

  • Uric acid stones. These can form when you lose too much fluid because of chronic diarrhea or malabsorption. They can also affect people whose diets are high in purines and those who have diabetes or metabolic syndrome. Your genes also may increase your risk of uric acid stones.

  • Cystine stones. This type of stone forms when your kidneys leak too much of a certain amino acid called cysteine into the pee. They occur in people with a genetic disorder called cystinuria. Cystine stones are rare, making up only about 1% to 2% of all kidney stones.

Kidney stones often have no single cause, and several factors may increase your risk for getting them. Some of these factors include:

Lack of water

You need to make enough pee to dilute the substances that can turn into stones. If you don't drink enough or sweat too much, your pee may look dark. It should be pale yellow or clear.

If you've had a stone before, you should pass about 8 cups of pee each day. So aim to drink about 10 cups of water daily, since you lose some fluids through sweat and breathing. Swap a glass of water for a citrus drink. The citrate in lemonade or orange juice can block stones from forming.

Family history

If close relatives have had kidney stones, you're at higher risk of also getting them. And if you've had kidney stones before, you're more likely to get them again.


What you eat can play a big role in whether you get kidney stones. Depending on what kind of kidney stones you've had, your doctor may want you to limit foods high in oxalates (like certain nuts and vegetables) or purines (like fatty meats and shellfish).

You should also watch your intake of:

  • Sodium. Too much salt makes your kidneys filter more calcium and can raise your chances of getting several types of kidney stones. We get most of our sodium not from the saltshaker, but from foods that are made with lots of it. So watch out for salty snacks, canned foods, packaged meats, and other processed foods.

  • Animal protein. Animal protein raises your pee's calcium level and lowers the amount of citrate, both of which encourage stones. Avoid getting more than than the recommended amount of protein. 

  • Sugar. Diets high in added sugars likecorn syrup, fructose, and sucrose can increase the odds of kidney stones. That may be partly because added sugars contribute to obesity, another risk factor for stones. Sugar is also thought to boost the calcium in your pee. 

You may have heard that drinking milk can bring on kidney stones. That's not true. If you eat or drink calcium-rich foods (like milk and cheese) and foods with oxalate at the same time, it helps your body better handle the oxalate. That's because the two tend to bind in the gut instead of in the kidneys, where a stone can form.


You're almost twice as likely to get a kidney stone if you have obesity, which doctors define as having a body mass index (BMI) of 30 or above. 

Weight loss surgery can help people with obesity improve their health. But studies suggest that people who have the most common weight loss operation, the Roux-en-Y gastric bypass, are at a higher risk of stones. Not every weight loss surgery carries this risk; only the ones that cause malabsorption.

Gut problems

Stones are the most common kidney problem in people with inflammatory bowel disease like Crohn’s disease and ulcerative colitis. Bowel problems can give you diarrhea, so you make less pee. Your body may absorb extra oxalate from the intestine, so more gets in your pee.

Other medical conditions

Many diseases can play a role in one or more types of kidney stones:

  • Certain genetic diseases. One example is medullary sponge kidney, a birth defect that causes cysts to form in your kidneys.

  • Type 2 diabetes. It can make your pee more acidic, which encourages stones.

  • Gout. This condition makes uric acid build up in your blood and form crystals in your joints and the kidneys. The kidney stones can become large and very painful.

  • Hyperparathyroidism. Your parathyroid glands can pump out too much parathyroid hormone, which raises calcium levels in your blood and pee.

  • Renal tubular acidosis. This kidney problem causes too much acid to build up in your body.

  • Metabolic syndrome. This is a cluster of conditions -- including high blood fats, obesity, and high blood pressure -- that raise your risk for serious conditions like heart disease and stroke. Metabolic syndrome is also linked to kidney stones. Experts think having this condition may increase the calcium, uric acid, and oxalate in your pee. 


Some that can cause stones include:

Also, avoid high-dose vitamin C and calcium supplements, both of which can raise your risk for kidney stones. Ask your doctor what's safe for you. 

Does ethnicity play a role?

Older studies showed that non-Hispanic white people were more likely to get kidney stones than other ethnic groups in the U.S. Some more recent research indicates that rates may be rising in Black people. But we need more studies on this. Kidney stones are less likely to be detected in people with less access to health care, so economic factors make a difference in who gets diagnosed. 

There's no one cause of kidney stones, which happen when minerals and other substances in your pee cluster together and form hard deposits. But many things can contribute to them, including not drinking enough water; your personal and family history; your diet; and other health conditions you have.  

Can stress cause kidney stones?

Research has found a link between high levels of stress and kidney stones. Scientists think that the chemical changes stress causes in your body increases substances like calcium, oxalate, and uric acid in your pee. It also reduces the volume of pee. All these things can contribute to kidney stones. 

How do you clear up kidney stones?

You may be able to pass a smaller kidney stone in your pee without treatment. To help it pass, you can drink lots of water. Over-the-counter pain relievers can help with discomfort. But ask your doctor before taking ibuprofen, which could raise your risk of other kidney problems.

Your doctor can also prescribe medications to help you pass a stone. For larger stones, or those with serious symptoms, your doctor could do a procedure that uses sound waves to break it up. Or they can remove it using surgery, or with a tube they insert through your urethra and bladder

Do kidney stones go away?

Most smaller stones will pass on their own. How long this takes varies from person to person, and depends on the size of the stone. It might take as little as a week. If the stone hasn't passed after 4-6 weeks, follow up with your doctor.