Skip to content
ketointermediate

A guide to keto, fasting and the brain: depression, memory and focus

Can keto and fasting sharpen your focus, boost your memory or lift your mood? See what the trials show for each goal, how to try it safely, and when it should only happen with your doctor or psychiatrist.

12 min

Can keto and fasting sharpen your brain?

Many people say their head feels clearer on keto or while fasting. Online, that turns into promises of sharper focus, a better memory and a diet that works against depression. If you are thinking about trying it, you want to know what holds up when researchers actually measure it, and what it takes from you.

Keto is a diet so low in carbohydrates, typically less than 20-50 grams a day, that your body goes into ketosis: your liver turns fat into ketones, mainly BHB (beta-hydroxybutyrate), which your brain can use as fuel instead of sugar. The same thing happens during a fast, once your body's sugar stores are used up. That is why researchers study whether the diet can affect the brain.

In one area, keto is an established treatment. The diet was developed for epilepsy, and the best evidence comes from randomized trials, where chance decides who gets the treatment and who goes into a control group used for comparison. In 2020, a Cochrane review, a thorough and independent review of all the research in a field, pooled 13 randomized trials with 932 participants. Children whose seizures could not be controlled with medication had fewer seizures on keto than with usual care, and more of them became seizure-free. For focus, memory and mood, the answer depends on your goal.

The short answer: what can you expect?

What do the trials show for your goal?

Your goal What the trials show Our advice
Sharper focus and memory when you are healthy No measurable gain
A dip in the first week, then the same test results as on an ordinary diet
Do not expect better focus, and wait four weeks before you judge
Memory with early memory problems or Alzheimer's Small trials
Small gains on some tests. In Alzheimer's, the largest trial of a ketone-forming fat (MCT) was negative, and nothing reliably shows that dementia slows down
Can be tried with your doctor, with your cholesterol checked
Better mood when you are healthy Mixed findings
Pooled analyses find anything from no effect to a modest improvement. In a year-long trial, mood improved most on a low-fat diet
Do not expect a mood boost
Depression One trial in depression
A small extra improvement after six weeks, below the researchers' own threshold for a noticeable difference
Only on top of your treatment, and with your doctor
Bipolar disorder and schizophrenia Experimental
Weight and blood sugar improved. Symptom improvement was only measured without a control group, and mania has occurred
Only with your psychiatrist
Epilepsy Established treatment
Fewer seizures in children with epilepsy that medication cannot control
Only in a specialist treatment program
The advice in the right-hand column is ours, based on the trials in the middle. The fewer and smaller the trials, the more cautious the advice.

How to try it, if you want to

Read the next section before you start, even if you do not take any medication.

  • Pick your goal, and measure it. Rate your focus, mood and sleep from 1 to 10 every evening for two weeks before you start, and keep going afterward. That gives you something to compare against instead of a feeling.
  • Get through the first week. In the first few days on keto, your body gets rid of more water and salt, so salt and fluids are the first thing to watch. Read our guide to electrolytes.
  • Judge after four weeks. Only then are you past the start-up phase. If you see no difference in your numbers, that matches what the trials found.
  • Fasting: Stick to 12-16 hours, for example by skipping breakfast, and do not start keto and fasting in the same week.
  • Stop, and contact your doctor the same day, if your mood gets clearly worse or you notice the signs of mania listed in the next section.

Who should not try this on their own?

  • Depression and other mental illness: Keto is not a replacement for treatment. Talk to your doctor before you start, and never change your medication yourself.
  • Signs of mania: If you sleep much less than usual without feeling tired, have unusually high energy, or your thoughts race during your first months of keto or fasting, contact your doctor or psychiatrist the same day. This is called hypomania, or mania in its more severe form. It applies even if you have never had bipolar disorder, where periods of depression alternate with periods like these.
  • Lithium (a mood-stabilizing medication for bipolar disorder): Your kidneys get rid of lithium along with salt, so the salt loss in the first weeks of keto can change your lithium level. Start only with your psychiatrist's agreement, and have the level checked. The same applies before you start fasting.
  • Antipsychotic medication (such as olanzapine, clozapine or quetiapine) often raises blood sugar and cholesterol. Keto can lower blood sugar but raise LDL cholesterol, the type of cholesterol that can build up in your arteries, so have your doctor follow both with blood tests. If you take clozapine, contact your doctor about constipation, which both the medication and keto can cause.
  • MAOIs (an older type of antidepressant): Aged cheeses, salami, fermented foods and soy and fish sauce can contain tyramine, a substance that together with the medication can cause dangerously high blood pressure. Stick to the food list you were given.
  • SSRI or SNRI antidepressants can cause too little sodium (salt) in the blood, especially in older people and people with low body weight, and the salt loss at the start of keto pulls the same way. Headache and nausea can be signs of it, so have your sodium checked, and contact your doctor the same day if you become confused.
  • Valproate, topiramate and zonisamide (for epilepsy, bipolar disorder or migraine): Together with keto, valproate can cause a shortage of carnitine, a substance your body uses to burn fat, and affect the liver, and both keto and topiramate or zonisamide can cause kidney stones and acid buildup in the blood. This needs blood tests and a plan from your doctor.
  • Diabetes medication: Insulin and sulfonylureas (tablets that make the pancreas release more insulin) can cause low blood sugar on keto and during fasting, and SGLT2 inhibitors (such as Jardiance and Farxiga) can cause ketoacidosis, a dangerous buildup of acid, even with normal blood sugar. Agree on diet and fasting with your doctor before you start. See our guide to type 2 diabetes.
  • Cholesterol: If you have heart disease or inherited high cholesterol, have your LDL cholesterol checked before and during the diet. Read our guide to cholesterol on keto.
  • Eating disorders: If you have, or have had, an eating disorder, do not try this without your care team. In a US study (Journal of Abnormal Psychology, 2008) that followed 496 teenage girls for five years, fasting, meaning a day or more without food to control weight, predicted later binge eating and bulimia. With anorexia and low body weight, keto is advised against entirely.
  • Pregnancy: Not without your doctor's agreement if you are pregnant or trying to get pregnant. In a US study (Birth Defects Research, 2018) of 1,740 mothers of babies with neural tube defects and 9,545 other mothers, eating very few carbohydrates before pregnancy was linked to a slightly higher risk of malformations of the spinal cord and brain.
  • Breastfeeding: A very low-carb diet can cause ketoacidosis in breastfeeding women. In a review of 18 reported cases (Medicina, 2020), nausea and vomiting were the most common signs, and most of the women were dieting. Agree on your diet with your doctor, and get medical help right away if you have nausea, vomiting or shortness of breath.
  • Children and teens: Keto and fasting under 18 only by agreement with a doctor. In children, keto is a medical treatment run by a specialist team.
  • Thoughts of suicide: If you are in crisis or having thoughts of suicide, call or text 988, which is open 24/7, or call 911 right away.

Focus: brain fog first, then no difference

In the first few days, your thinking can slow down. Many people describe headaches, tiredness and brain fog, meaning it is hard to think clearly, during their first week on keto, the so-called keto flu. It has also been measured. In a randomized trial in the American Journal of Clinical Nutrition (2011), 16 young men tried both a very high-fat, low-carb diet and an ordinary diet for five days each. On the high-fat diet, their attention, speed and mood were worse.

Once your body has adapted, the difference disappears. In a randomized trial in the same journal (2019), 11 healthy adults tried both keto and a high-carb diet for three weeks each. Attention, memory, planning skills and mood were the same.

Fasting shows the same picture. A meta-analysis, meaning a pooled analysis of many studies, in Psychological Bulletin (2025) covered 3,484 healthy adults, and the median fast in the trials lasted 12 hours. Fasted and fed people did equally well on the tests, with a small dip only for longer fasts and in younger participants.

In a randomized trial of 122 people (Journal of Health Psychology, 2026), where half skipped breakfast and fasted for 16 hours over ten days, those who fasted did no worse on tests or in mood than those on the waiting list. They did, however, feel less able to concentrate in the morning while fasting than later in the day after eating. Compared with the waiting list, the difference was too small to be certain.

Memory: small gains with early memory problems

The idea behind keto for memory problems is that the brain in Alzheimer's takes up less sugar but can still use ketones. In a PET study, where scans show how much fuel the brain takes up, the brain took up 13% less sugar in 10 people with mild Alzheimer's than in 29 healthy people (Journal of Alzheimer's Disease, 2015), while the uptake of ketones was the same.

Mild cognitive impairment (MCI) means memory problems that are greater than normal for your age, but not dementia. In a randomized trial of 23 older adults with MCI (Neurobiology of Aging, 2012), funded in part by the Atkins Foundation, the group eating very few carbohydrates did better on one memory test after six weeks. But they also ate 1,036 calories a day versus 1,599, and with 23 participants the trial cannot separate the diet from simply eating less.

In a randomized trial of 26 people with Alzheimer's (Alzheimer's Research & Therapy, 2021), daily functioning and quality of life were rated better on keto, but the overall test of thinking skills did not change significantly.

A meta-analysis of 12 randomized trials with 707 participants (Archives of Gerontology and Geriatrics, 2026) found a small to moderate gain on memory and language tests, and LDL cholesterol went up.

MCT oil is a fat the liver quickly turns into ketones. With early memory problems, participants in the randomized BENEFIC trial (Alzheimer's & Dementia, 2021) with 122 people, funded in part by Nestlé, did better on a few of many tests with an MCT drink than with a placebo, an inactive copy. In Alzheimer's, an MCT product had no effect in the largest randomized trial, NOURISH AD, with 413 people (Journal of Alzheimer's Disease, 2020), run by the manufacturer itself.

A single Turkish randomized trial of 60 people with Alzheimer's (Journal of Nutrition, Health & Aging, 2026) found that the test score rose slightly over six months with keto and fasting on top of usual care, while it fell with usual care alone. The control group got no dietary guidance, though, and the result has not been repeated. Fasting on its own has only been studied in a few small, short trials.

The book The Keto & Intermittent Fasting Lifestyle for Beginners by Anders Hejlsvig
The book
Want the whole picture?
You have tried before. Counted calories, cut portions, pushed through. And then it all came back. The book explains what your body is actually doing, and why it was never about willpower. 502 pages and 56 peer-reviewed studies.
Read about the book

Mood and depression: small and mixed findings

In healthy people, the picture is mixed. In a year-long randomized trial of 106 adults with overweight or obesity (Archives of Internal Medicine, 2009), mood improved more on a low-fat diet than on a very low-carb diet, and memory improved equally on both.

A meta-analysis of 30 randomized trials with 1,781 participants (International Journal of Food Sciences and Nutrition, 2025) found no effect of low-carb diets on mood or depression. Another, in JAMA Psychiatry (2026), found a modest drop in depressive symptoms in 10 randomized trials, mostly where participants measured their ketones.

In depression, the first proper randomized trial came in 2026. In JAMA Psychiatry, British researchers followed 88 adults with treatment-resistant depression, meaning depression where at least two kinds of antidepressant had not helped enough. Half ate keto with less than 30 grams of carbohydrate a day for six weeks. The rest added one extra serving of fruit or vegetables a day and ate unsaturated instead of saturated fat.

The keto group got ready-made meals, the control group food vouchers, both got weekly support, and the participants kept the rest of their treatment. The researchers themselves note that the ready-made meals may have lifted mood by sparing the participants shopping and cooking.

Depression was measured with the PHQ-9, a questionnaire scored from 0 to 27 points. After six weeks, the keto group had dropped 10.5 points and the control group 8.3. The difference of 2.18 points was just barely statistically significant, meaning unlikely to be chance, but smaller than the 5 points the researchers had set in advance as the threshold for a difference you can notice. After 12 weeks the difference was no longer significant, and six weeks after the support ended, 48% of the keto group had given up the diet entirely.

The eye-catching numbers come from pilot studies, small trials meant to show whether a larger one is feasible, without a control group. In a Canadian pilot study (Journal of Affective Disorders, 2025), 7 of the 8 who finished were free of their depression, but only 11 started, and you cannot tell what was due to the diet. In a small randomized trial of 64 adults with obesity (Brain, Behavior, and Immunity, 2026), of whom 37 finished, the Mediterranean diet, rich in vegetables, fish and olive oil, improved depressive symptoms more than keto.

In people with depression, fasting has only been studied in a few studies without random assignment. Among 100 men with depression in Bahrain, depression did not get worse in the 50 who chose to keep Ramadan for four weeks (Nutrients, 2021), but they were not assigned by chance. In people without mental illness, a meta-analysis of 11 fasting studies with 1,436 participants (Nutrients, 2021) found slightly lower scores for depression and anxiety.

Bipolar disorder and schizophrenia: still experimental

In schizophrenia, people may hear voices or have delusions, among other symptoms. Many people with bipolar disorder or schizophrenia take medication that causes weight gain and higher blood sugar, which is one reason keto is being tested.

The first randomized trial came from San Francisco in 2026 (Schizophrenia Bulletin). 58 people with schizophrenia or bipolar disorder ate either keto or their usual diet for one month. The keto group lost weight, and their HbA1c (a measure of long-term blood sugar) and insulin resistance, meaning the body responds poorly to the hormone insulin, improved. Symptoms and thinking skills also improved after four months on keto, but that was only measured before and after, without a control group.

In a Scottish pilot study (BJPsych Open, 2025), 26 people with stable bipolar disorder started keto for 6-8 weeks. They lost weight and their blood pressure fell, but their mood did not change on the rating scales, and one person had a hypomanic episode.

In a series of case reports (Frontiers in Nutrition, 2026), 9 people developed hypomania or mania within two months of starting keto. Seven of them had never had a bipolar diagnosis.

The fasting timer in the Shifting Source app
The Shifting Source app
Take the fasting timer with you
Fasting and keto in one app. The timer keeps track of the hours, while the Keto tab counts your net carbs down toward your target. Your Trends follows your energy and hunger over time, and badges keep the momentum up. It all connects to Apple Health. Free for iPhone.
Download on the App Store

Frequently asked questions

Does keto cause brain fog?

Many people experience it in the first week, and it has also been measured. In the trials, the difference was gone once the body had adapted to the diet.

Should I take MCT oil for my memory?

It cannot be recommended as a treatment. With early memory problems, an MCT drink gave small gains on some tests, in Alzheimer's none, and stomach problems are common. Our article on MCT oil covers a small trial in young adults.

Can keto replace my antidepressant?

No. In the only randomized trial in depression, the participants kept the rest of their treatment, and keto gave only a small extra improvement.

Can keto prevent dementia?

Nobody knows. No trial has tested whether keto prevents dementia. The Turkish trial included people who already had Alzheimer's, and the result has not been repeated.

Does fasting help your mood?

In healthy people, fasting does not make mood worse and may lift it slightly. In people with depression, it has only been looked at in a few small studies.

Related Reading

DepressionCognitionMemoryAlzheimer'sEpilepsyBrain FogIntermittent FastingBipolar Disorder
Keto Assistant

Hi! I'm your keto assistant

Ask me about keto diet, fasting, recipes or health. You can also upload a food image and I'll assess whether it's keto-friendly.