In this article
N39.0 is the ICD-10 code for a UTI when the provider does not name the anatomical site. To assign a complete, compliant code set for a urinary tract infection, you need the current ICD-10-CM code set and the provider's clinical note. Lab results alone never drive code assignment. Below is the full decision tree, the organism and history codes, and the errors that cause rework and denials.
What you need before you start
UTI was the most common infection seen in US physician offices, at about 10 million encounters a year (2016–2019 data), according to NIH-indexed research, so you will code this diagnosis often. Three preparation checks keep the assignment clean: a current code set, the provider's actual documentation, and a quick review of the Excludes1 notes.
Current ICD-10-CM code set access
Confirm your code set is current. N39.0, "Urinary tract infection, site not specified," is billable in the FY2027 edition, effective October 1, 2026. Claire's guide to mastering ICD-10-CM codes faster covers the Alphabetic Index and Tabular List lookup sequence if you want a refresher.
Provider documentation requirements
The provider's diagnostic statement controls the code, not the labs. Under Section I.A.19 of the FY2027 ICD-10-CM Official Guidelines, "the assignment of a diagnosis code is based on the provider's diagnostic statement that the condition exists," not on the clinical criteria the provider used.
Excludes1 notes to review
Read the Excludes1 note at N39.0 before assigning anything. In the FY2027 Tabular List it excludes candidiasis of the urinary tract (B37.4-), neonatal urinary tract infection (P39.3), pyuria (R82.81), and "urinary tract infection of specified site, such as" cystitis (N30.-), pyonephrosis (N13.6) and urethritis (N34.-). If one of those conditions is documented, N39.0 is off the table.
How to assign the ICD-10 code for UTI, step by step
The assignment runs in three steps: confirm the diagnosis and site, assign the primary code with any organism code, and add history when it is documented. Each step produces a decision you can defend from the note itself. A short worked example threads through all three.
The example patient is a 42-year-old female with dysuria and urgency. The provider documents "UTI due to E. coli" with no site specified, and the history notes three prior UTIs in the past twelve months, each treated and resolved.
Confirm the diagnosis and check for a specified site
First, confirm the provider documented a UTI diagnosis. Then scan the note for an anatomical site: bladder, kidney, or urethra. The site changes everything.
Documentation of cystitis, pyelonephritis, pyonephrosis or urethritis sends you to a site-specific code. The Excludes1 note at N39.0 covers any "urinary tract infection of specified site," and the sites it lists are examples, not a complete list. If the diagnosis is never stated at all, stop and query rather than infer one from the labs.
In the example, the provider documented "UTI" with no site specified, so the pathway stays with N39.0. Had the note said "cystitis," the Alphabetic Index would lead to N30.90 (Cystitis, unspecified without hematuria); N30.00 or N30.01 apply only when "acute" is documented.
Assign the primary code and add organism codes
With no site specified, N39.0 becomes the primary diagnosis code. It carries the instruction "Use additional code (B95-B97), to identify infectious agent." N39.0 sequences first and the organism code follows.
In the example, the provider names E. coli as the cause, so B96.20 (Unspecified Escherichia coli as the cause of diseases classified elsewhere) is added as a secondary code. A culture result on its own is not enough; the provider has to link the organism to the infection. The B95-B97 range covers streptococcus, staphylococcus and enterococcus (B95), other bacterial agents such as E. coli and Klebsiella (B96), and viral agents (B97).
Add recurrence history when documented
Next, check the patient's documented infection history. Z87.440 (Personal history of urinary (tract) infections) reports past UTIs that have resolved. The FY2027 guidelines (Section I.C.21.c.4) say history codes "are also acceptable on any medical record regardless of the reason for visit," so Z87.440 can be added as a secondary code alongside an active infection when the record documents prior UTIs. It is supported by that documentation, not by the coder counting episodes against a clinical definition.
For clinical context, the AUA/CUA/SUFU recurrent UTI guideline defines recurrent uncomplicated UTI in women as two culture-proven episodes within six months or three within one year. That definition guides treatment; it is not a coding criterion.
The last step is verification: review the Excludes1 notes, confirm none applies, and check the final set against the documentation. The final assignment is N39.0, B96.20, Z87.440.
Coding mistakes to avoid
Most UTI coding errors fall into three patterns: defaulting to the unspecified code, misusing the history code, and treating different infection patterns as interchangeable. Each one is catchable before the claim goes out.
Using the unspecified code when a site is documented
N39.0 is wrong the moment the note names a site. Acute cystitis codes to N30.00 or N30.01, acute pyelonephritis to N10, and urethritis to N34.-. Reporting N39.0 alongside a site-specific code for the same infection breaks the Excludes1 convention and is a common audit finding. When the site is in the note, code it.
Misapplying Z87.440 for active infections
Z87.440 describes past infections that have resolved, never the current one. When the infection is active, the infection code comes first and Z87.440 follows only if prior UTIs are documented. At a follow-up visit after treatment is complete, category Z87 instructs you to code first the follow-up examination (Z09), with Z87.440 after it. The word "recurrent" alone, without documented past episodes, does not support Z87.440.
Confusing recurrent, chronic, and unresolved infections
ICD-10-CM has no separate code for chronic UTI. In the Alphabetic Index, Infection, urinary (tract) has no "chronic" subterm, so a chronic UTI with no site still codes to N39.0. The chronic codes apply only when the provider names the site: chronic cystitis codes to N30.20 or N30.21, interstitial cystitis to N30.10 or N30.11, and chronic pyelonephritis to N11.9.
The term "urosepsis" is a separate problem. Per Section I.C.1.d.1.a.(ii) of the FY2027 ICD-10-CM Official Guidelines, it is a nonspecific term, is not synonymous with sepsis, has no default code in the Alphabetic Index, and the provider must be queried before any code is assigned.
A worked example
One encounter shows how the whole decision tree holds together. Here is the documentation the coder actually had, followed by the rationale for each code.
The patient encounter and documentation
A 42-year-old female presents with dysuria, urgency and frequency. The provider's assessment reads "Urinary tract infection due to E. coli," with no anatomical site named anywhere in the note. The urinalysis is abnormal and the culture grows E. coli. The history section records three UTIs in the past twelve months, each treated with antibiotics and each fully resolved.
Nothing in the documentation mentions candidiasis, a neonatal infection, pyuria without infection, or a specified site, so no Excludes1 condition applies. The note supports an active infection, a named organism and documented past infections, which is exactly what the final code set reflects.
The code assignment and rationale
Three codes, three separate jobs, each traceable to a line in the record.
| Code | Descriptor | Why it is assigned |
|---|---|---|
| N39.0 | Urinary tract infection, site not specified | Primary code; the provider confirmed a UTI without naming a site |
| B96.20 | Unspecified Escherichia coli as the cause of diseases classified elsewhere | Secondary; the provider documents E. coli as the cause, per the "use additional code (B95-B97)" instruction |
| Z87.440 | Personal history of urinary (tract) infections | Secondary; the record documents three prior UTIs, each resolved |
The infection code leads because it is the reason for the visit. The organism and history codes follow because the note supports them, in that order.
How UTI coding changes when documentation differs
The code set follows the documentation. A handful of documentation patterns cover almost every UTI encounter, and each produces a different assignment.
Site-specific UTI documentation
When the note names a site, leave N39.0 behind. Acute cystitis without hematuria codes to N30.00, and with hematuria to N30.01. Acute pyelonephritis codes to N10, and urethritis to N34.-. N30 and N10 carry their own "use additional code (B95-B97)" instruction for the organism, and each site-specific code has instructional notes worth reading before you finalize.
Recurrent and chronic infection patterns
When prior UTIs are documented and the infection is active, code the infection first and add Z87.440 second. When there is no current infection and only the history matters, Z87.440 may be reported without an infection code, after any reason-for-visit code such as Z09 at a follow-up. When the provider documents a chronic infection at a named site, the chronic site codes apply.
| Documentation says | Code assignment |
|---|---|
| UTI, no site specified | N39.0, plus a B95-B97 organism code if the provider names one |
| Acute cystitis | N30.00 without hematuria, N30.01 with hematuria |
| Acute pyelonephritis | N10 |
| Urethritis | N34.- |
| Active UTI with documented prior UTIs | N39.0 or a site-specific code, plus Z87.440 |
| History of UTI, no current infection | Z87.440 (after Z09 at a follow-up visit) |
| Chronic UTI, no site | N39.0 |
| Chronic cystitis | N30.20 without hematuria, N30.21 with hematuria |
| Interstitial cystitis | N30.10 without hematuria, N30.11 with hematuria |
Source: FY2027 ICD-10-CM Tabular List and Alphabetic Index.
Why getting it right matters
UTI coding is quick when the documentation is clean. The costs show up when it isn't.
Effect on inpatient claims
As a secondary diagnosis, N39.0 is a complication or comorbidity (CC) in the FY2027 MS-DRGs, which can move a stay into a higher-weighted DRG. It loses CC status when the principal diagnosis is on its CC exclusion list, which includes other urinary infection codes, and when it is a catheter-associated UTI that was not present on admission (a hospital-acquired condition). Our guide to CC/MCC coding explains how those rules play out.
Why the stakes are high
Complicated UTIs are expensive to treat: the mean hospitalization cost was $12,759 among US adult inpatients with a complicated UTI from 2018 to 2024, per a Premier Healthcare Database analysis presented at ISPOR 2026. A coding error on claims that size leads to rework, rebilling and the risk of claim denials. Cases with multiple comorbidities, unclear documentation, or the word "urosepsis" in the note deserve a CDI query or a peer review before submission, not after a denial.
How to check your code assignment worked
A short check catches problems while they are still cheap to fix.
Check code validity and Excludes1 notes
Confirm every code is valid and billable for the date of service. N39.0 remains valid in FY2027, which took effect October 1, 2026. Then re-read the Excludes1 note against the final code set. AI tools that read clinical notes can flag a documentation gap before it becomes a denial; Claire's post on finding ICD-10 codes from clinical notes covers how that works.
Confirm sequencing against documentation
Sequencing follows a fixed order: the active infection code first, the organism code second, the history code after that. Then cross-check every code against the provider's written words. If B96.20 is on the claim, the provider should name E. coli as the cause, not just the lab. If Z87.440 is on the claim, the note should document prior, resolved infections.
Verify, then query
Once your codes are verified, decide whether the encounter needs a query, for instance when the note says "urosepsis" or never ties the organism to the diagnosis. Claire's Physician Query Generator drafts a compliant query with one issue per query and only the options your clinical indicators support, and Claire's answers give the codes with the guideline behind them; see how Claire helps coders write better CDI queries. Describe your next UTI encounter to Claire without patient identifiers and compare its suggested code set, reasoning included, against your own. ICD-10-CM questions are included in the free plan.
Frequently asked questions
What is the ICD-10 code for a UTI?
N39.0, "Urinary tract infection, site not specified," is the billable code for a UTI with no anatomical site documented. You reach it through the Alphabetic Index at Infection, urinary (tract). As a secondary diagnosis on an inpatient claim, N39.0 is a CC unless the principal diagnosis is on its exclusion list or it is a hospital-acquired catheter-associated UTI.
What is the ICD-10 code for UTI unspecified?
N39.0 is the unspecified UTI code. Use it only when the diagnosis is confirmed but the site is not documented; if a site is named, the site-specific code replaces it. Section I.B.18 of the FY2027 Official Guidelines supports this: unspecified codes should be reported when they most accurately reflect what is known about the patient's condition at that encounter.
What is the ICD-10 code for recurrent UTI?
There is no single recurrent UTI code in ICD-10-CM. An active infection with no site codes to N39.0, with Z87.440 added when prior UTIs are documented; with no current infection, Z87.440 is reported on its own (after Z09 at a follow-up visit). The Medicare Code Editor flags Z87.440 as an unacceptable principal diagnosis on inpatient claims.
Can N39.0 and Z87.440 be coded together?
Yes. Code the active infection first, then add Z87.440 when the record documents prior UTIs that resolved. The FY2027 guidelines (Section I.C.21.c.4) allow history codes on any record regardless of the reason for the visit. The word "recurrent" on its own, with no documented past episodes, does not support Z87.440.
How is urosepsis coded in ICD-10-CM?
"Urosepsis" requires a provider query. If the provider clarifies a UTI only, code the UTI, for example N39.0. If the provider confirms sepsis due to the UTI, sequence the systemic infection first (A41.51 for sepsis due to E. coli, or A41.9 when the organism is not specified), then N39.0, and add R65.20 or R65.21 for severe sepsis. Our sepsis coding guide covers the sequencing rules in detail.
How is a suspected UTI coded in outpatient settings?
In outpatient settings, a suspected, probable or rule-out UTI is not coded as a UTI. Section IV.H of the FY2027 ICD-10-CM Official Guidelines (effective October 1, 2026) says to code "to the highest degree of certainty for that encounter/visit, such as symptoms, signs, abnormal test results." Code R30.0 for dysuria, R35.0 for frequency, or R82.90 for unspecified abnormal findings in urine. Once the provider confirms the diagnosis, N39.0 or a site-specific code applies. Inpatient admissions to short-term acute care, long-term care and psychiatric hospitals work the opposite way: an uncertain diagnosis documented at discharge is coded as if it existed (Sections II.H and III.C).

Written by
Nicole HosfordMBA, BHA, CPC, CRC, CDEO, Approved Instructor
Co-founder of Claire and a risk adjustment coding and clinician educator with over two decades in healthcare, including more than a decade in medical coding. Her expertise spans risk adjustment, ProFee coding, auditing, compliance, and provider education, and she has designed and implemented training programs that improve provider compliance with ICD-10 and documentation guidelines across Medicare, Medicaid, and commercial product lines. As a Certified Risk Adjustment Coder and approved instructor, she helps strengthen coding quality through training, accuracy, and continuous improvement — the same standards she brings to Claire.







