A computer program such as KetoCalculator may be used to help generate recipes.[47] The meals often have four components: heavy whipping cream, a protein-rich food (typically meat), a fruit or vegetable and a fat such as butter, vegetable oil, or mayonnaise. Only low-carbohydrate fruits and vegetables are allowed, which excludes bananas, potatoes, peas, and corn. Suitable fruits are divided into two groups based on the amount of carbohydrate they contain, and vegetables are similarly divided into two groups. Foods within each of these four groups may be freely substituted to allow for variation without needing to recalculate portion sizes. For example, cooked broccoli, Brussels sprouts, cauliflower, and green beans are all equivalent. Fresh, canned, or frozen foods are equivalent, but raw and cooked vegetables differ, and processed foods are an additional complication. Parents are required to be precise when measuring food quantities on an electronic scale accurate to 1 g. The child must eat the whole meal and cannot have extra portions; any snacks must be incorporated into the meal plan. A small amount of MCT oil may be used to help with constipation or to increase ketosis.[37]

Advocates for the diet recommend that it be seriously considered after two medications have failed, as the chance of other drugs succeeding is only 10%.[9][31][32] The diet can be considered earlier for some epilepsy and genetic syndromes where it has shown particular usefulness. These include Dravet syndrome, infantile spasms, myoclonic-astatic epilepsy, and tuberous sclerosis complex.[9][33]
Physicians of ancient Greece treated diseases, including epilepsy, by altering their patients' diet. An early treatise in the Hippocratic Corpus, On the Sacred Disease, covers the disease; it dates from c. 400 BC. Its author argued against the prevailing view that epilepsy was supernatural in origin and cure, and proposed that dietary therapy had a rational and physical basis.[Note 3] In the same collection, the author of Epidemics describes the case of a man whose epilepsy is cured as quickly as it had appeared, through complete abstinence of food and drink.[Note 4] The royal physician Erasistratus declared, "One inclining to epilepsy should be made to fast without mercy and be put on short rations."[Note 5] Galen believed an "attenuating diet"[Note 6] might afford a cure in mild cases and be helpful in others.[11]

I just have to tell you, just to remind you, I am a type 1 diabetic and have been for 34 years. My kidney function has been going down gradually for several years including 4 points from June of this year to August. My GFR score was 42 in August, which I was told was stage 3 kidney failure. As of October 24 — I just got the results today — but as of October 24 my GFR score was 57 — 60 is considered normal. 

The nerve impulse is characterised by a great influx of sodium ions through channels in the neuron's cell membrane followed by an efflux of potassium ions through other channels. The neuron is unable to fire again for a short time (known as the refractory period), which is mediated by another potassium channel. The flow through these ion channels is governed by a "gate" which is opened by either a voltage change or a chemical messenger known as a ligand (such as a neurotransmitter). These channels are another target for anticonvulsant drugs.[7]
Reduced hunger. Many people experience a marked reduction in hunger on a keto diet. This may be caused by an increased ability of the body to be fueled by its fat stores. Many people feel great when they eat just once or twice a day, and may automatically end up doing a form of intermittent fasting. This saves time and money, while also speeding up weight loss.