Quick Answer:
| The ICD-10-CM code for diarrhea is R19.7 (Diarrhea, unspecified). Use it when a provider documents diarrhea without a known cause, type, or confirmed diagnosis. If the record names a cause, such as an infection, a drug, IBS-D, or functional diarrhea, a more specific code usually replaces R19.7. |
What Is the ICD-10 Code for Diarrhea?
The ICD-10-CM code for unspecified diarrhea is R19.7. It is in Chapter 18 which covers symptoms, signs and abnormal clinical or laboratory findings. It falls under category R19, which covers other digestive system and abdominal symptoms.
- Official descriptor: Diarrhea, unspecified, with Diarrhea NOS as the inclusion term.
- Excludes1 notes: functional diarrhea (K59.1), neonatal diarrhea (P78.3) and psychogenic diarrhea (F45.8).
- FY2027 status: R19.7 remains a billable and specific code in the FY2027 set, effective October 1, 2026, with the same Excludes1 notes.
R19.7 is a symptom code. It tells the payer the patient has diarrhea but not why so it is usually a placeholder until the provider documents a cause.
Diarrhea ICD-10 Code Quick Reference Table
| Scenario (as documented) | Code | Notes |
| Diarrhea, no cause identified | R19.7 | Symptom-only or workup pending |
| Functional diarrhea | K59.1 | Diagnosis of exclusion |
| IBS with diarrhea (IBS-D) | K58.0 | Needs a documented IBS diagnosis |
| Infectious gastroenteritis/diarrhea, organism not identified | A09 | Infectious origin documented |
| Viral gastroenteritis | A08.4 | Viral intestinal infection, unspecified |
| Rotaviral enteritis | A08.0 | Common in children |
| Norovirus enteritis | A08.11 | Specific viral agent |
| Campylobacter enteritis | A04.5 | Confirmed organism |
| C. difficile enterocolitis | A04.71 / A04.72 | Recurrent or not specified as recurrent |
| Noninfective gastroenteritis/colitis NOS | K52.9 | Noninfectious cause documented |
| Antibiotic- or drug-induced diarrhea | K52.1 + T36–T50 (5th/6th char 5) | Adverse effect code required |
| Neonatal diarrhea (noninfective) | P78.3 | Newborn period |
| Psychogenic diarrhea | F45.8 | Psychological cause documented |
| Dehydration with diarrhea | Cause code + E86.0 | When documented |
| History of C. diff (from Oct 1, 2026) | Z86.17 | New in FY2027 |
How ICD-10-CM Classifies Diarrhea: A Simple Specificity Guide
Diarrhea coding is just like moving from a general code to a more specific one:
- Diarrhea only R19.7: Use this when the provider documents diarrhea but does not identify a cause.
- Gastroenteritis A09 / K52.9: Use these when the provider documents infectious or noninfectious gastroenteritis but does not give a more specific cause.
- Specific cause or diagnosis A04.-, A08.-, K52.1, K58.0, K59.1 and others: Use a more specific code when the provider identifies the cause or condition.
The main rule: Use the most specific code supported by the medical record. Do not keep using R19.7 when the provider documents a cause but do not choose a more specific code than the documentation supports.
Is There an ICD-10 Code for Acute or Chronic Diarrhea?
No. ICD-10-CM does not have separate codes for acute and chronic diarrhea. The duration of diarrhea is clinically important but it does not change the diarrhea code by itself.
- Acute diarrhea: Usually lasts less than 2 weeks.
- Persistent diarrhea: Lasts about 14 to 30 days.
- Chronic diarrhea: Lasts more than 1 month.
Coding impact:
- Acute diarrhea or chronic diarrhea with no cause then prefer to use R19.7.
- Chronic diarrhea does not mean K58.0 or K59.1. Those need a documented IBS-D or functional diarrhea diagnosis.
- Check the Alphabetic Index for any chronic modifier before assigning a code.
But remember the duration cannot impact the ICD-10-CM code of diarrhea. It depends only on the diagnosis and cause documented by the provider.
R19.7 vs K59.1 vs K58.0: Which Code Is Correct?
| Code | What it means | Type | When to use it |
| R19.7 | Diarrhea, cause not known | Symptom | Use when the provider documents diarrhea but does not identify a specific cause |
| K59.1 | Functional diarrhea | Diagnosis | Use when the provider diagnoses functional diarrhea and no organic cause is found |
| K58.0 | IBS with diarrhea (IBS-D) | Diagnosis | Use when the provider documents IBS with diarrhea |
Important: Do not choose K59.1 or K58.0 just because the patient has chronic diarrhea. The provider must document the specific diagnosis. R19.7 can be changed to K59.1 or K58.0 only when the provider documents the specific diagnosis. Do not assign these codes just because the patient has a long history of diarrhea.
Infectious Diarrhea ICD-10 Codes
A09 is used for infectious gastroenteritis and colitis. Use it when the provider documents infectious diarrhea, colitis, enteritis, or gastroenteritis without naming the organism. Do not use A09 for diarrhea with no known cause (R19.7) or noninfectious gastroenteritis (K52.9).
When a Specific Germ Is Identified
If testing identifies the cause, use the code for that specific infection:
- A08.- Viral infections, such as rotavirus, norovirus, or unspecified viral gastroenteritis.
- A04.- Bacterial infections, such as E. coli, Campylobacter, and Yersinia.
- A02.0 Salmonella enteritis.
- A03.- Shigellosis.
- A07.1 Giardiasis.
C. difficile
For C. difficile enterocolitis:
- A04.71. Recurrent C. difficile enterocolitis
- A04.72. C. difficile enterocolitis, not specified as recurrent
Use the code that matches the provider’s documentation about whether the infection is recurrent.
Traveler’s Diarrhea
For traveler’s diarrhea without a specific organism, use A09. If testing identifies the pathogen, use the appropriate specific infection code like A04.-, A07.-, or A08.-.
Noninfectious Diarrhea Codes (K52 Family)
- K52.9: Noninfective gastroenteritis and colitis, unspecified. Use it when the provider documents noninfectious gastroenteritis or colitis but does not give a specific cause. It excludes diarrhea NOS (R19.7), functional diarrhea (K59.1) and infectious gastroenteritis NOS (A09)
- K52.1: Toxic gastroenteritis and colitis including drug-induced diarrhea.
- K52.2-: Allergic and dietetic gastroenteritis and colitis such as food protein-induced enterocolitis
- K52.83-: Microscopic colitis, including collagenous colitis (K52.831) and lymphocytic colitis (K52.832)
- K50.- / K51.-: Crohn’s disease and ulcerative colitis when the provider documents these conditions
- K90.0: Celiac disease when documented by the provider
How to Code Medication-Induced Diarrhea
When a provider documents that diarrhea is caused by a medication then two codes are generally needed:
- K52.1: Toxic gastroenteritis and colitis, which includes drug-induced diarrhea.
- T36–T50 adverse effect code: Identifies the drug involved. The code uses the required 5th or 6th character 5 for an adverse effect.
Examples
- Diarrhea caused by amoxicillin: K52.1 + T36.0X5A
- Diarrhea caused by irinotecan: K52.1 + T45.1X5A along with the right neoplasm code.
Important: The provider must document that the medication caused the diarrhea. Do not assume a drug is the cause based only on the medication list or timing. If the relationship is unclear, query the provider.
Pediatric and Neonatal Diarrhea Coding
- P78.3: Use for noninfective diarrhea in newborns. It has an Excludes1 note for R19.7.
- In children, look for an identified infectious cause. Common codes include A08.0 for rotavirus, A08.4 for viral gastroenteritis, A09 for unspecified infectious gastroenteritis and A04.- for bacterial infections.
- If the child has diarrhea and dehydration, code the documented cause of diarrhea or R19.7 when no cause is known and add E86.0 for dehydration when the provider documents it.
Diarrhea With Dehydration or Electrolyte Problems
When these conditions are documented, they also need to be coded:
| Condition | Code |
| Dehydration | E86.0 |
| Hypovolemia | E86.1 |
| Volume depletion, unspecified | E86.9 |
| Hypokalemia | E87.6 |
| Hyponatremia | E87.1 |
The order of the codes depends on the reason for the visit and the applicable facility or payer rules.
Important Diarrhea Coding Rules
- Do not code R19.7 with K59.1, P78.3, or F45.8. These conditions have Excludes1 notes against R19.7.
- Do not code R19.7 with A09. A09 excludes diarrhea NOS (R19.7).
- Do not report diarrhea separately when it is already part of a confirmed diagnosis. For example, do not add R19.7 when A08.4 or K58.0 already explains the diarrhea.
- Do not code uncertain diagnoses in outpatient settings. If the provider documents suspected gastroenteritis or rule out colitis then code the documented symptom with R19.7.
- Use the most specific diagnosis supported by the documentation. If the provider identifies the cause, do not use R19.7 just because diarrhea is also documented.
- Update the coding when new results become available. If a test later identifies the cause, use the appropriate diagnosis code based on the updated provider documentation.
Documentation Checklist for Providers
Good documentation helps coders choose the correct diarrhea code instead of using R19.7 when a more specific diagnosis is supported.
Providers should document:
- Onset, duration and frequency of diarrhea
- Stool appearance, such as watery, bloody, mucus-filled, or greasy
- Other symptoms, including fever, abdominal pain, vomiting, or weight loss
- Recent antibiotics, chemotherapy, travel, or contact with someone who was sick
- Tests and results like stool PCR, stool culture, C. difficile testing, or calprotectin
- A clear diagnosis rather than only writing loose stools
- Hydration status and any electrolyte problems
- For drug-related diarrhea, clearly state the connection, such as diarrhea due to [drug name]
FY2027 Update: What Changed for Diarrhea Coding?
The FY2027 ICD-10-CM code set starts on October 1, 2026. It includes new, deleted and revised codes. Published sources show different totals, so always check the official CMS code set for the final numbers.
For diarrhea-related coding, one important new code is:
- Z86.17: Personal history of Clostridioides difficile (C. diff) infection. This new code specifically identifies a patient’s history of C. diff infection.
- Before FY2027, a history of C. diff was generally included under Z86.19, which covers a personal history of other infectious diseases.
The main diarrhea codes including R19.7, K59.1, K58.0, K52.9, and A09, remain unchanged based on the materials reviewed.


