Diabetic ketoacidosis (DKA) is a potentially life-threatening complication of diabetes mellitus. Signs and symptoms may include vomiting, abdominal pain, deep gasping breathing, increased urination, weakness, confusion and occasionally loss of consciousness. A person's breath may develop a specific "fruity" smell. The onset of symptoms is usually rapid. People without a previous diagnosis of diabetes may develop DKA as the first obvious symptom.
 DKA happens most often in those with type 1 diabetes but can also occur in those with other types of diabetes under certain circumstances. Triggers may include infection, not taking insulin correctly, stroke and certain medications such as steroids. DKA results from a shortage of insulin; in response, the body switches to burning fatty acids, which produces acidic ketone bodies. DKA is typically diagnosed when testing finds high blood sugar, low blood pH and keto acids in either the blood or urine.
 The primary treatment of DKA is with intravenous fluids and insulin. Depending on the severity, insulin may be given intravenously or by injection under the skin. Usually, potassium is also needed to prevent the development of low blood potassium. Throughout treatment, blood sugar and potassium levels should be regularly checked. Underlying causes for the DKA should be identified. In those with severely low blood pH who are critically ill, sodium bicarbonate may be given; however, its use is of unclear benefit and typically not recommended.
 Rates of DKA vary around the world. Each year, about 4% of type 1 diabetics in the United Kingdom develop DKA, versus 25% of type 1 diabetics in Malaysia. DKA was first described in 1886, and until the introduction of insulin therapy in the 1920s, it was almost universally fatal. With adequate and timely treatment, the risk of death is between <1% and 5%.
 The first full description of diabetic ketoacidosis is attributed to Julius Dreschfeld, a German pathologist working in Manchester, United Kingdom. In his description, which he gave in an 1886 lecture at the Royal College of Physicians in London, he drew on reports by Adolph Kussmaul as well as describing the main ketones, acetoacetate and β-hydroxybutyrate, and their chemical determination. The condition remained almost universally fatal until the discovery of insulin in the 1920s; by the 1930s, mortality had fallen to 29 percent, and by the 1950s it had become less than 10 percent. The entity of cerebral edema due to DKA was described in 1936 by a team of doctors from Philadelphia.
 Numerous research studies since the 1950s have focused on the ideal treatment for diabetic ketoacidosis. A significant proportion of these studies have been conducted at the University of Tennessee Health Science Center and Emory University School of Medicine. Treatment options studied have included high- or low-dose intravenous, subcutaneous or intramuscular (e.g. the "Alberti regime") insulin, phosphate supplementation, need for a loading dose of insulin, and the appropriateness of using bicarbonate therapy in moderate DKA. Various questions remain unanswered, such as whether bicarbonate administration in severe DKA makes any real difference to the clinical course, and whether an insulin loading dose is needed in adults.
 The symptoms of an episode of diabetic ketoacidosis usually evolve over a period of about 24 hours. Predominant symptoms are nausea and vomiting, pronounced thirst, excessive urine production and abdominal pain that may be severe. In severe DKA, breathing becomes rapid and of a deep, gasping character, called "Kussmaul breathing". The abdomen may be tender to the point that a serious abdominal condition may be suspected, such as acute pancreatitis, appendicitis or gastrointestinal perforation. Vomiting altered blood that resembles coffee grounds occurs in a minority of people and tends to originate from erosion of the esophagus. In severe DKA, there may be confusion or a marked decrease in alertness, including coma.
 On physical examination there is usually clinical evidence of dehydration, such as a dry mouth and decreased skin turgor. If the dehydration is profound enough to cause a decrease in the circulating blood volume, a rapid heart rate and low blood pressure may be observed. Often, a "ketotic" odor is present, which is often described as "fruity" or "like pear drops". The smell is due to the presence of acetone. If Kussmaul respiration is present, this is reflected in an increased respiratory rate.
 Small children with DKA are relatively prone to brain swelling, also called cerebral edema, which may cause headache, coma, loss of the pupillary light reflex, and can progress to death. It occurs in about 1 out of 100 children with DKA and more rarely occurs in adults.
 DKA most frequently occurs in those who know that they have diabetes, but it may also be the first presentation in someone who has not previously been known to be diabetic. There is often a particular underlying problem that has led to the DKA episode; this may be intercurrent illness (pneumonia, influenza, gastroenteritis, a urinary tract infection), pregnancy, inadequate insulin administration (e.g. defective insulin pen device), myocardial infarction (heart attack), stroke or the use of cocaine. Young people with recurrent episodes of DKA may have an underlying eating disorder, or may be using insufficient insulin for fear that it will cause weight gain.
 Diabetic ketoacidosis may occur in those previously known to have diabetes mellitus type 2 or in those who on further investigations turn out to have features of type 2 diabetes (e.g. obesity, strong family history); this is more common in African, African-American and Hispanic people. Their condition is then labeled "ketosis-prone type 2 diabetes".
 Drugs in the gliflozin class (SGLT2 inhibitors), which are generally used for type 2 diabetes, have been associated with cases of diabetic ketoacidosis where the blood sugars may not be significantly elevated ("euglycemic DKA"). While this is a relatively uncommon adverse event, it is thought to be more common if someone receiving an SGLT2 inhibitor who is also receiving insulin has reduced or missed insulin doses. Furthermore, it can be triggered by severe acute illness, dehydration, extensive exercise, surgery, low-carbohydrate diets, or excessive alcohol intake. Proposed mechanisms for SGLT2-I induced "euglycemic DKA" include increased ketosis due to volume depletion combined with relative insulin deficiency and glucagon excess.  SGLT2 inhibitors should be stopped before surgery and only recommenced when it is safe to do so. SGLT2 inhibitors may be used in people with type 1 diabetes, but the possibility of ketoacidosis requires specific risk management. Specifically, they should not be used if someone is also using a low carbohydrate or ketogenic diet.
 Diabetic ketoacidosis arises because of a lack of insulin in the body. The lack of insulin and corresponding elevation of glucagon leads to increased release of glucose by the liver (a process that is normally suppressed by insulin) from glycogen via glycogenolysis and also through gluconeogenesis. High glucose levels spill over into the urine, taking water and solutes (such as sodium and potassium) along with it in a process known as osmotic diuresis. This leads to polyuria, dehydration, and polydipsia. The absence of insulin also leads to the release of free fatty acids from adipose tissue (lipolysis), which the liver converts into acetyl CoA through a process called beta oxidation. Acetyl CoA is metabolised into ketone bodies under severe states of energy deficiency, like starvation, through a process called ketogenesis, whose final products are aceto-acetate and β-Hydroxybutyrate. These ketone bodies can serve as an energy source in the absence of insulin-mediated glucose delivery, and is a protective mechanism in case of starvation. The ketone bodies, however, have a low pKa and therefore turn the blood acidic (metabolic acidosis). The body initially buffers the change with the bicarbonate buffering system, but this system is quickly overwhelmed and other mechanisms must work to compensate for the acidosis. One such mechanism is hyperventilation to lower blood carbon dioxide levels (a form of compensatory respiratory alkalosis). This hyperventilation, in its extreme form, may be observed as Kussmaul respiration.
 In various situations such as infection, insulin demands rise but are not matched by the failing pancreas. Blood sugars rise, dehydration ensues, and resistance to the normal effects of insulin increases further by way of a vicious circle.
 As a result of the above mechanisms, the average adult with DKA has a total body water shortage of about 6 liters (or 100 mL/kg), in addition to substantial shortages in sodium, potassium, chloride, phosphate, magnesium and calcium. Glucose levels usually exceed 13.8 mmol/L or 250 mg/dL.
 DKA is common in type 1 diabetes as this form of diabetes is associated with an absolute lack of insulin production by the islets of Langerhans. In type 2 diabetes, insulin production is present but is insufficient to meet the body's requirements as a result of end-organ insulin resistance. Usually, these amounts of insulin are sufficient to suppress ketogenesis. If DKA occurs in someone with type 2 diabetes, their condition is called "ketosis-prone type 2 diabetes". The exact mechanism for this phenomenon is unclear, but there is evidence both of impaired insulin secretion and insulin action. Once the condition has been treated, insulin production resumes and often the person may be able to resume diet or tablet treatment as normally recommended in type 2 diabetes.
 The clinical state of DKA is associated, in addition to the above, with the release of various counterregulatory hormones such as glucagon and adrenaline as well as cytokines, the latter of which leads to increased markers of inflammation, even in the absence of infection.
 Cerebral edema, which is the most dangerous DKA complication, is probably the result of a number of factors. Some authorities suggest that it is the result of overvigorous fluid replacement, but the complication may develop before treatment has been commenced. It is more likely in those with more severe DKA, and in the first episode of DKA. Likely factors in the development of cerebral edema are dehydration, acidosis and low carbon dioxide levels; in addition, the increased level of inflammation and coagulation may, together with these factors, lead to decreased blood flow to parts of the brain, which then swells up once fluid replacement has been commenced. The swelling of brain tissue leads  to raised intracranial pressure ultimately leading to death.
 The entity of ketosis-prone type 2 diabetes was first fully described in 1987 after several preceding case reports. It was initially thought to be a form of maturity onset diabetes of the young, and went through several other descriptive names (such as "idiopathic type 1 diabetes", "Flatbush diabetes", "atypical diabetes" and "type 1.5 diabetes") before the current terminology of "ketosis-prone type 2 diabetes" was adopted.
 It has been reported predominantly in non-white ethnicity in African–Americans, Hispanics, Black Africans and Black Caribbeans. There is a link with G6PD deficiency.
 Diabetic ketoacidosis may be diagnosed when the combination of hyperglycemia (high blood sugars), ketones in the blood or on urinalysis and acidosis are demonstrated. In about 10% of cases the blood sugar is not significantly elevated ("euglycemic diabetic ketoacidosis").
 A pH measurement is performed to detect acidosis. Blood from a vein is adequate, as there is little difference between the arterial and the venous pH; arterial samples are only required if there are concerns about oxygen levels. Ketones can be measured in the urine (acetoacetate) and blood (β-hydroxybutyrate). When compared with urine acetoacetate testing, capillary blood β-hydroxybutyrate determination can reduce the need for admission, shorten the duration of hospital admission and potentially reduce the costs of hospital care. At very high levels, capillary blood ketone measurement becomes imprecise.
 In addition to the above, blood samples are usually taken to measure urea and creatinine (measures of kidney function, which may be impaired in DKA as a result of dehydration) and electrolytes. Furthermore, markers of infection (complete blood count, C-reactive protein) and acute pancreatitis (amylase and lipase) may be measured. Given the need to exclude infection, chest radiography and urinalysis are usually performed.
 If cerebral edema is suspected because of confusion, recurrent vomiting or other symptoms, computed tomography may be performed to assess its severity and to exclude other causes such as stroke.
 Diabetic ketoacidosis is distinguished from other diabetic emergencies by the presence of large amounts of ketones in blood and urine, and marked metabolic acidosis. Hyperosmolar hyperglycemic state (HHS, sometimes labeled "hyperosmolar non-ketotic state" or HONK) is much more common in type 2 diabetes and features increased plasma osmolarity (above 320 mosm/kg) due to profound dehydration and concentration of the blood; mild acidosis and ketonemia may occur in this state, but not to the extent observed in DKA. There is a degree of overlap between DKA and HHS, as in DKA the osmolarity may also be increased.
 Ketoacidosis is not always the result of diabetes. It may also result from alcohol excess and from starvation; in both states the glucose level is normal or low. Metabolic acidosis may occur in people with diabetes for other reasons, such as poisoning with ethylene glycol or paraldehyde.
 The American Diabetes Association categorizes DKA in adults into one of three stages of severity:
 A 2004 statement by the European Society for Paediatric Endocrinology and the Lawson Wilkins Pediatric Endocrine Society (for children) uses slightly different cutoffs, where mild DKA is defined by pH 7.20–7.30 (bicarbonate 10–15 mmol/L), moderate DKA by pH 7.1–7.2 (bicarbonate 5–10) and severe DKA by pH<7.1 (bicarbonate below 5).
 Attacks of DKA can be prevented in those known to have diabetes to an extent by adherence to "sick day rules"; these are clear-cut instructions to patients on how to treat themselves when unwell. Instructions include advice on how much extra insulin to take when sugar levels appear uncontrolled, an easily digestible diet rich in salt and carbohydrates, means to suppress fever and treat infection, and recommendations on when to call for medical help.
 People with diabetes can monitor their own ketone levels when unwell and seek help if they are elevated.
 The main aim in the treatment of diabetic ketoacidosis is to replace the lost fluids and electrolytes while suppressing the high blood sugars and ketone production with insulin. Admission to an intensive care unit (ICU) or similar high-dependency area or ward for close observation may be necessary.
 The amount of fluid replaced depends on the estimated degree of dehydration. If dehydration is so severe as to cause shock (severely decreased blood pressure with insufficient blood supply to the body's organs), or a depressed level of consciousness, rapid infusion of saline (1 liter for adults, 10 mL/kg in repeated doses for children) is recommended to restore circulating volume. Slower rehydration based on calculated water and sodium shortage may be possible if the dehydration is moderate, and again saline is the recommended fluid. Very mild ketoacidosis with no associated vomiting and mild dehydration may be treated with oral rehydration and subcutaneous rather than intravenous insulin under observation for signs of deterioration.
 Normal saline (0.9% saline) has generally been the fluid of choice. There have been a few small trials looking at balanced fluids with few differences.
 A special but unusual consideration is cardiogenic shock, where the blood pressure is decreased not due to dehydration but due to the inability of the heart to pump blood through the blood vessels. This situation requires ICU admission, monitoring of the central venous pressure (which requires the insertion of a central venous catheter in a large upper body vein), and the administration of medication that increases the heart pumping action and blood pressure.
 Some guidelines recommend a bolus (initial large dose) of insulin of 0.1 units of insulin per kilogram of body weight. This can be administered immediately after the potassium level is known to be higher than 3.3 mmol/L; if the level is any lower, administering insulin could lead to a dangerously low potassium level (see below). Other guidelines recommend a bolus given intramuscularly if there is a delay in commencing an intravenous infusion of insulin, whereas guidelines for the management of pediatric DKA recommend delaying the initiation of insulin until fluids have been administered. It is possible to use rapid acting insulin analogs injections under the skin for mild or moderate cases.
 In general, insulin is given at 0.1 units/kg per hour to reduce blood sugars and suppress ketone production. Guidelines differ as to which dose to use when blood sugar levels start falling; American guidelines recommend reducing the dose of insulin once glucose falls below 16.6 mmol/L (300 mg/dL) and UK guidelines at 14 mmol/L (253 mg/dL). Others recommend infusing glucose in addition to saline to allow for ongoing infusion of higher doses of insulin.
 Potassium levels can fluctuate severely during the treatment of DKA, because insulin decreases potassium levels in the blood by redistributing it into cells via increased sodium-potassium pump activity. A large part of the shifted extracellular potassium would have been lost in urine because of osmotic diuresis. Hypokalemia (low blood potassium concentration) often follows treatment. This increases the risk of dangerous irregularities in the heart rate. Therefore, continuous observation of the heart rate is recommended, as well as repeated measurement of the potassium levels and addition of potassium to the intravenous fluids once levels fall below 5.3 mmol/L. If potassium levels fall below 3.3 mmol/L, insulin administration may need to be interrupted to allow correction of the hypokalemia.
 The administration of sodium bicarbonate solution to rapidly improve the acid levels in the blood is controversial. There is little evidence that it improves outcomes beyond standard therapy, and indeed some evidence that while it may improve the acidity of the blood, it may actually worsen acidity inside the body's cells and increase the risk of certain complications. Its use is therefore discouraged, although some guidelines recommend it for extreme acidosis (pH<6.9), and smaller amounts for severe acidosis (pH 6.9–7.0).
 Cerebral edema, if associated with coma, often necessitates admission to intensive care, artificial ventilation, and close observation. The administration of fluids is slowed. The ideal treatment of cerebral edema in DKA is not established, but intravenous mannitol and hypertonic saline (3%) are used—as in some other forms of cerebral edema—in an attempt to reduce the swelling. Cerebral edema is unusual in adults.
 Resolution of DKA is defined as the general improvement in the symptoms, such as the ability to tolerate oral nutrition and fluids, normalization of blood acidity (pH>7.3), and absence of ketones in the blood (<1 mmol/L) or urine. Once this has been achieved, insulin may be switched to the usual subcutaneously administered regimen, one hour after which the intravenous administration can be discontinued.
 In people with suspected ketosis-prone type 2 diabetes, determination of antibodies against glutamic acid decarboxylase and islet cells may aid in the decision whether to continue insulin administration long-term (if antibodies are detected), or whether to withdraw insulin and attempt treatment with oral medication as in type 2 diabetes. Generally speaking, routine measurement of C-peptide as a measure of insulin production is not recommended unless there is genuine doubt as to whether someone has type 1 or type 2 diabetes.
 Diabetic ketoacidosis occurs in 4.6–8.0 per 1000 people with diabetes annually. Rates among those with type 1 diabetes are higher with about 4% in the United Kingdom developing DKA a year while in Malaysia the condition affects about 25% a year. In the United States, 135,000 hospital admissions occur annually as a result of DKA, at an estimated cost of $2.4 billion or a quarter to half the total cost of caring for people with type 1 diabetes. There has been a documented increasing trend in hospital admissions. The risk is increased in those with an ongoing risk factor, such as an eating disorder, and those who cannot afford insulin. About 30% of children with type 1 diabetes receive their diagnosis after an episode of DKA. Lower socio‐economic status and higher area‐level deprivation are associated with an increased risk of diabetic ketoacidosis in people with diabetes mellitus type 1.
 Previously considered universally fatal, the risk of death with adequate and timely treatment is between <1% and 5%. Up to 1% of children with DKA develop a complication known as cerebral edema. Rates of cerebral edema in US children with DKA have risen from 0.4% in 2002 to 0.7% in 2012. Between 2 and 5 out of 10 children who develop brain swelling will die as a result.
 Resolution of DKA requires meeting the following parameters: