What causes OCD isn’t fully established yet but it may be a combination of genes, temperament, and lived experiences.

Obsessive-compulsive disorder (OCD) is a mental health condition that might make you feel as if you’re caught in a persistent cycle of obsessions and compulsions.

Obsessions are recurrent and intrusive thoughts, urges, or images that can bring on distressing feelings. Compulsions are the behaviors a person uses to avoid or get rid of unwanted thoughts and feelings.

But what causes these OCD symptoms?

Researchers believe a combination of genetics, temperament, brain structure, and environmental factors cause OCD.

Genes seem to play a large role in the development of OCD.

Research with twins and families shows OCD has a high heritability rate. For example, OCD rates are higher in identical twins compared to fraternal twins.

Twin studies also show a genetic link between OCD and:

In fact, the same study estimates that the heritability of OCD and similar conditions could be as high as 50%.

For example, autism spectrum disorder (ASD) seems to be closely linked to OCD. One study found autistic people had double the chance of later getting an OCD diagnosis. Those who got an OCD diagnosis first had a nearly fourfold chance of receiving an ASD diagnosis later in life.

In another family study of three generations, researchers found OCD occurred more often in families where at least one person had OCD than in families in the control group.

The likelihood of OCD rose when first‐degree family members, such as a mother, father, sibling, or child, had either OCD, tic disorders, affective disorders, or anxiety disorders.

Genome-wide studies have also provided some information on specific genes that may contribute to OCD. But individually, these genes may contribute only a small portion of the total genetic risk. A large part of the specific genetic risk for OCD is still unknown.

Brain structure could also play a role in OCD.

Brain scans show that the brain structure in people with OCD may be slightly different from people without OCD.

Still, some of these differences could also be related to medication.

Certain personality traits could be more or less common in people with this condition and they might contribute to the causes of OCD.

Older research found that people with OCD had more harm avoidance traits but lower levels of the following traits than people without OCD:

  • self-directedness, or the capacity to adapt to new situations
  • reward dependence, or the tendency to respond to social rewards, like approval
  • cooperativeness

Another twin study looked at three aspects of obsessive-compulsive symptoms:

  • checking
  • obsessions that involved aggression
  • fear of contamination

The study explored how these symptoms relate to the personality traits of extraversion and neuroticism, or the tendency to experience low moods.

While the three OCD symptoms were linked to neuroticism, their ties to extraversion were minimal.

Environmental factors such as stress, trauma, and even bacteria may also play a role in what causes OCD.

It’s well-known that stress can activate symptoms of OCD. For example, OCD is often linked to major life changes, such as:

  • divorce
  • losing a loved one
  • school difficulties
  • relationship issues
  • abuse

One older study found a relationship between childhood trauma and the severity of OCD, but the link wasn’t direct. Instead, it was influenced by difficulties with attachment and processing emotions.

Alexithymia, or difficulty identifying and naming emotions, also played a role in how many OCD symptoms someone experienced and how severe they were.

Another environmental risk factor for children is PANDAS (pediatric autoimmune neuropsychiatric disorder associated with strep). This is a rare subtype of childhood OCD that occurs when strep bacteria causes an immune reaction, resulting in OCD-like symptoms.

The symptoms of PANDAS appear similar to childhood-onset OCD. But onset can look quite different.

Typical childhood-onset OCD often begins when the child is 8 to 12 years old, and symptoms increase over time. PANDAS can occur between 4 and 14 years old, and it has a more sudden and intense onset of symptoms.

Several factors could mean a greater chance of having OCD. They include:

  • Genetic factors. Your chances of having OCD could be higher if a close family member lives with OCD.
  • Having another mental health condition. Your chances of developing OCD might be higher if you live with an anxiety disorder, eating disorder, or ADHD, for example.
  • Stress. It can trigger the onset of OCD in a person already at risk.
  • Pregnancy. Hormone shifts during pregnancy may trigger OCD in some people.
  • Age. OCD is most common in older teens and young adults, though people of all ages — except infants — can have it.

In the Diagnostic and Statistical Manual of Mental Disorders (DSM-5), OCD is listed in its own category. This is a change from the DSM-4, which categorized OCD as an anxiety disorder.

This change is due to new research and evidence showing common threads running through a number of OCD-related conditions.

For example, other conditions in the new category — such as body dysmorphic disorder and hoarding — also involve obsessive thinking or repetitive behaviors.

So, what exactly would a mental health professional look for to diagnose OCD?

You might receive an OCD diagnosis if:

  • You experience obsessions, compulsions, or both.
  • These symptoms take up a lot of time in your day.
  • The obsessions and compulsions interfere with your social or work life.

Mental health professionals also check to make sure your symptoms can’t be better explained by another condition, such as generalized anxiety disorder or body dysmorphic disorder.

They’ll also note your level of insight into your obsession and beliefs. Insight levels in OCD exist on a spectrum.

People with good insight into their symptoms tend to realize the distorted thoughts caused by OCD don’t reflect reality. Meanwhile, someone with absent insight might believe these thoughts do line up with reality.

What causes OCD isn’t yet understood but experts suspect it may be a combination of:

  • genetics
  • brain structure
  • temperament
  • environment

Living with OCD can be a challenge because it can affect many or all areas of life. But with the right treatment, you can reduce your symptoms and relieve stress related to obsessions and compulsions.

Treatment for OCD can include a wide range of therapies and medications and it’s often effective.