Learn the different types of hemorrhoids, symptoms, causes, complications, how a diagnosis is made, and ICD-10-CM coding for hemorrhoids. Three coding examples are also provided to test your knowledge.

ICD-10-CM coding for hemorrhoids and what they are

What Are Hemorrhoids?

Hemorrhoids, or piles, are swollen and inflamed veins found around the anus or in the lower rectum. They are similar to varicose veins.

Hemorrhoids are a common medical condition, and they are more likely to occur as a person ages. Although rarely serious, a person may see his or her physician and be diagnosed with this condition, especially if the symptoms don’t go away or get worse.

Types of Hemorrhoids

There are two types of hemorrhoids: external hemorrhoids and internal hemorrhoids.

  • External hemorrhoids form under the skin around the anus
  • Internal hemorrhoids form in the lining of the anus and lower rectum

According to the Mayo Clinic, external hemorrhoids lie below the dentate (pectinate) line and are covered by squamous epithelium and supplied with cutaneous nerves.

Internal hemorrhoids emerge above the dentate line and are covered by columnar epithelium that lacks pain receptors. These hemorrhoids are graded based on the degree of prolapse (protrusion) below the dentate line into the anal canal and include:

  • Grade I hemorrhoids. These may bleed but do not prolapse outside of the anal canal; on colonoscopy, they are seen as small bulges into the anal canal.
  • Grade II hemorrhoids. These bleed and may prolapse outside the anal canal with straining but spontaneously return to position.
  • Grade III hemorrhoids. These bleed and prolapse outside the anal canal and usually require manual reduction.
  • Grade IV hemorrhoids. These bleed and have prolapsed tissue that cannot be manually reduced. Acutely thrombosed hemorrhoids and those with rectal mucosal prolapse are also considered grade IV.

internal and external hemorrhoids

Signs and Symptoms

External Hemorrhoids

Symptoms of external hemorrhoids may include:

  • anal itching
  • anal ache or pain, particularly while sitting
  • one or more lumps appearing near the anus

These symptoms may get worse if an individual strains, rubs, or cleans too much around the anus. For many people, the symptoms go away within a few days.

Internal Hemorrhoids

Symptoms of internal hemorrhoids may include:

  • blood in the stool, on the toilet paper, or in the toilet after a bowel movement
  • a hemorrhoid that has prolapsed, or fallen through the anal opening

If the internal hemorrhoid is prolapsed, pain and discomfort may occur. Conversely, a nonprolapsed hemorrhoid usually produces no pain.

Rectal bleeding and other anal symptoms are usually caused by hemorrhoids, but not always. For example, rectal bleeding may be due to such conditions as anal fissure, proctitis, Crohn’s disease, diverticulosis, ulcerative colitis, rectal ulcer, rectal prolapse, ischemic colitis, rectal trauma, anal cancer, and colon cancer, according to MedicineNet.

healthy and prolapsed hemorrhoid


According to the National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK), hemorrhoids are caused by:

  • straining during bowel movements
  • sitting on the toilet for long periods of time
  • chronic constipation or diarrhea
  • a low-fiber diet
  • weakening of the supporting tissues in your anus and rectum (occurs as person ages)
  • pregnancy
  • often lifting heavy objects

causes of hemorrhoids


According to the Mayo Clinic, hemorrhoid complications are rare, but when they occur, they include:

  • Anemia. Chronic blood loss from hemorrhoids can cause a lack of healthy red blood cells to carry oxygen to the cells.
  • Strangulated hemorrhoid. If the blood supply is cut off to to an internal hemorrhoid, strangulation of the hemorrhoid may occur and result in severe pain.
  • Blood clot. On occasion, a thrombus (clot) can form in a hemorrhoid and cause severe pain. This is known as a thrombosed hemorrhoid and may require lancing and drainage.

Making a Diagnosis

Hemorrhoids are often diagnosed by a primary care physician, gastroenterologist, or proctologist during a physical examination. According to the NIDDK, the physician will ask the patient about his or her medical history, symptoms, diet, toilet habits, enema or laxative use, and current health problems.

External hemorrhoids can be diagnosed during an examination of the anal area. Internal hemorrhoids can be diagnosed during a digital rectal examination. The physician may also perform certain procedures, such as an anoscopy or rigid proctosigmoidoscopy, to help in the diagnosis of internal hemorrhoids.

Physical Exam

During a physical exam, the physician will check the anal area for:

  • lumps or swelling
  • internal hemorrhoids that have prolapsed (fallen through the anal opening) 
  • external hemorrhoids with a blood clot in a vein
  • stool or mucus leakage
  • skin irritation
  • skin tags (extra skin left behind once a blood clot in an external hemorrhoid dissolves)
  • anal fissures (small tears in the anus that may cause itching, pain, or bleeding)

The physician will perform a digital rectal examination to check:

  • the anal muscle tone
  • for tenderness, blood, internal hemorrhoids, and lumps or masses


An anoscopy and rigid proctosigmoidoscopy may be performed to make a diagnosis of internal hemorrhoids. These procedures use different instruments to look at different sections of the colon (large intestine).

  • Anoscopy. An anoscope (hollow tube with a light) is used for viewing the lining of the anus and lower rectum. This procedure can be performed in the doctor’s office or at an outpatient center. It usually requires no anesthesia.  
  • Rigid proctosigmoidoscopy. A proctoscope (short, metal tube) is used for viewing of the rectal lining and lower colon. This procedure can be carried out in the doctor’s office, at an outpatient center, or in the hospital. Anesthesia is not usually required. 

Internal hemorrhoids may also be diagnosed during such procedures as a colonoscopy or flexible sigmoidoscopy. These procedures are often performed during a routine examination of the rectum and colon or when other procedures are carried out for other digestive tract problems.

Treatment of hemorrhoid symptoms can generally be provided by a primary care physician. However, a gastroenterologist or proctologist may be needed to handle the more complicated cases.

Coding for Hemorrhoids (ICD-10-CM)

Codes for hemorrhoids are located in the ICD-10-CM coding manual in Chapter 11. Diseases of the digestive system (K00-K95), block K64, Hemorrhoids and perianal venous thrombosis.

In ICD-10-CM, hemorrhoids are classified by location (internal, external, mixed). Internal hemorrhoids are further classified based on appearance and degree of severity, or prolapse. The codes and descriptions include:

  • K64.0, First-degree hemorrhoids
    Grade/stage I hemorrhoids
    Hemorrhoids (bleeding) without prolapse outside of anal canal
  • K64.1,Second-degree hemorrhoids
    Grade/stage II hemorrhoids
    Hemorrhoids (bleeding) that prolapse with straining, but retract spontaneously
  • K64.2,Third-degree hemorrhoids
    Grade/stage III hemorrhoids
    Hemorrhoids (bleeding) that prolapse with straining and require manual replacement back inside anal canal
  • K64.3, Fourth-degree hemorrhoids
    Grade/stage IV hemorrhoids
    Hemorrhoids (bleeding) with prolapsed tissue that cannot be manually replaced
  • K64.4, Residual hemorrhoidal skin tags
    External hemorrhoids, NOS
    Skin tags of anus
  • K64.5, Perianal venous thrombosis
    External hemorrhoids with thrombosis
    Perianal hematoma
    Thrombosed hemorrhoids NOS
  • K64.8, Other hemorrhoids
    Internal hemorrhoids, without mention of degree
    Prolapsed hemorrhoids, degree not specified
  • K64.9, Unspecified hemorrhoids
    Hemorrhoids (bleeding) NOS
    Hemorrhoids (bleeding) without mention of degree

Before making a final code selection from this category, be sure to review the instructional notes at K64. There is an Includes note that indicates “piles” is another term for hemorrhoids.

An Excludes1 note exists that indicates hemorrhoids complicating childbirth and the puerperium must be coded to O87.2 and that hemorrhoids complicating pregnancy must be coded to O22.4. Both these codes are located in Chapter 15 and should not be assigned codes from K64. 

An Excludes2 note exists that indicates if the patient has any of those conditions listed in addition to the hemorrhoid conditions from K64, they too should be assigned:

  • certain conditions originating in the perinatal period (P04-P96)
  • certain infectious and parasitic diseases (A00-B99)
  • complications of pregnancy, childbirth and the puerperium (O00-O9A)
  • congenital malformations, deformations and chromosomal abnormalities (Q00-Q99)
  • endocrine, nutritional and metabolic diseases (E00-E88)
  • injury, poisoning and certain other consequences of external causes (S00-T88)
  • neoplasms (C00-D49)
  • symptoms, signs and abnormal clinical and laboratory findings, not elsewhere classified (R00-R94)

Coding Examples

Let’s look at these three ICD-10-CM coding scenarios.

Scenario #1

A patient sees his primary care physician and complains of severe itching, pain, swelling, and bleeding in the anal area. Upon examination, he is diagnosed with external hemorrhoids.

ICD-10-CM: K64.4

To locate the correct code for the hemorrhoid in the ICD-10-CM coding manual Index, look up Hemorrhoids, external K64.4. This code can then be verified in the Tabular as:

K64.4, Residual hemorrhoidal skin tags
External hemorrhoids, NOS
Skin tags of anus

Scenario #2

A patient arrives for a colonoscopy to determine the cause of his rectal bleeding. The diagnosis is Grade II bleeding internal hemorrhoids and non-bleeding diverticulosis of the large intestine.

ICD-10-CM: K64.1, K57.30

The documentation indicates the patient’s rectal bleeding is due to Grade II internal bleeding hemorrhoids. This tells us the hemorrhoids are the cause of the bleeding. We know from the information covered above under “Signs and Symptoms” that there can be many causes of rectal bleeding (one being diverticulosis), so it’s important to review the documentation before selecting the appropriate code.

To locate the correct code for the hemorrhoid in the ICD-10-CM coding Index, look up Hemorrhoids, 2nd degree (grade/stage II) (that prolapse with straining but retract spontaneously) K64.1. This code can then be verified in the Tabular as:

K64.1, Second-degree hemorrhoids
Grade/stage II hemorrhoids
Hemorrhoids (bleeding) that prolapse with straining, but retract spontaneously

The patient also has non-bleeding diverticulosis of the large intestine, so this also needs to be coded. Locate the code in the Index by looking under Diverticulosis, large intestine K57.30. This code can then be verified in the Tabular as:

K57.30, Diverticulosis of large intestine without perforation or abscess without bleeding
Diverticular disease of colon NOS

Be sure to review all the instructional notes at K57.3 before making a final code selection. There are “Excludes1,” “Excludes2,” and “Code also” notes provided.

Scenario #3

A patient presents to her family physician with complaints of pain while walking, sitting, and defecating, bleeding with defecating, and swelling around the anus. Patient states these symptoms have gone on for four weeks, and hot baths and over-the-counter medications have been unsuccessful. Physician examines the anal area and identifies a circle of lumps, dark blue in color. Patient is diagnosed with external hemorrhoids with thrombosis, and topical nifedipine is prescribed.

ICD-10-CM: K64.5

To locate the correct code for the hemorrhoid in the ICD-10-CM coding manual Index, look up Hemorrhoids, external, thrombosed K64.5. This code can then be verified in the Tabular as:

K64.5, Perianal venous thrombosis
External hemorrhoids with thrombosis
Perianal hematoma
Thrombosed hemorrhoids NOS

Again, review the instructional notes before assigning the code.

Hopefully, you now have a better understanding of coding for hemorrhoids in ICD-10-CM and know what to look for in the documentation.

ICD-10-CM coding for hemorrhoids