How Do You Get OCD? Causes and Risk Factors

You don’t “get” OCD the way you catch a cold. Obsessive-compulsive disorder develops through a combination of genetic vulnerability, brain chemistry differences, and sometimes environmental triggers. With a lifetime prevalence of about 3%, up to 240 million people worldwide will experience OCD at some point, and roughly half of all cases begin in childhood or adolescence. Understanding what drives this condition can help you recognize it early and make sense of why it develops in some people and not others.

Genetics Play the Strongest Role

OCD runs in families. If you have a parent, sibling, or child with OCD, your risk of developing it is significantly higher than someone in the general population. Twin studies consistently show that genetics have a stronger influence than shared environment, meaning growing up in the same household as someone with OCD matters less than sharing their DNA. That said, no single “OCD gene” has been identified, and the inheritance pattern remains unclear. What’s likely passed down is a vulnerability, not a guarantee.

Brain Circuits That Get Stuck

OCD is closely linked to a specific loop of brain activity connecting the front of the brain, a deep structure called the striatum, and the thalamus (a relay center that filters information). In a brain without OCD, this loop helps you evaluate threats, make decisions, and move on. In OCD, the loop becomes hyperactive. The front of the brain, which handles planning and worry, sends too many “danger” signals. The striatum, which normally helps filter out irrelevant concerns, fails to dampen those signals. The thalamus then amplifies everything and sends it right back to the frontal areas, creating a feedback loop of anxiety and doubt that the person can’t easily break.

This is why OCD feels so compelling. It’s not a lack of willpower or a character flaw. The brain’s alarm system is genuinely firing too often and too intensely, and the internal “brakes” that would normally quiet it down aren’t working properly.

Serotonin and Other Chemical Factors

The chemical messenger serotonin plays a central role in OCD. Researchers first suspected this because medications that increase serotonin availability in the brain relieve OCD symptoms, while medications targeting other chemical messengers (like norepinephrine) do not. The serotonin system in OCD appears to be dysregulated: the brain overreacts behaviorally to serotonin signals while underreacting in other measurable ways. This imbalance likely contributes to the repetitive, hard-to-stop quality of obsessions and compulsions.

Dopamine, another chemical messenger involved in habits and reward, also plays a supporting role, particularly in people who have OCD alongside tic disorders like Tourette’s syndrome.

When Infections Trigger OCD in Children

One of the more surprising causes of OCD involves the immune system. In some children, a strep throat infection can trigger a sudden, dramatic onset of OCD symptoms. This condition, called PANDAS (Pediatric Autoimmune Neuropsychiatric Disorders Associated with Streptococcal infections), occurs when the immune system fights off the strep bacteria but mistakenly attacks healthy brain tissue in the process. The result can be overnight emergence of obsessive-compulsive behaviors, tics, severe anxiety, mood swings, and even loss of previously developed skills.

A broader version of this, called PANS, can be triggered by other infections or immune disruptions beyond strep. Both conditions typically appear between age 3 and puberty, and the hallmark is how abruptly symptoms arrive. A child who seemed fine one week may suddenly develop intense rituals, food restriction, or uncontrollable movements the next. PANDAS requires a confirmed strep infection within three months of symptom onset, while PANS can follow other immune triggers.

When OCD Typically Starts

About 21% of OCD cases begin by age 10. Boys tend to develop symptoms earlier, with average onset between ages 9 and 11, while girls more commonly develop OCD between 11 and 13. The remaining cases emerge in later adolescence or adulthood, sometimes gradually and sometimes in response to a period of high stress. Children and adolescents are just as likely as adults to experience the full condition, not a milder version of it.

What OCD Actually Looks Like

OCD involves two components: obsessions and compulsions. Obsessions are unwanted, intrusive thoughts, images, or urges that cause significant distress. Common obsessions include fear of contamination from germs or chemicals, unwanted violent or sexual mental images, excessive worry about harming someone through carelessness, obsessive concern about religious or moral failure, and a need for things to feel “just right.” These aren’t ordinary worries. They’re persistent, distressing, and feel impossible to dismiss.

Compulsions are the behaviors or mental acts a person performs to neutralize the anxiety from obsessions. These can be visible (excessive hand washing, checking locks, rearranging objects) or invisible (counting silently, repeating words in your head, praying in specific patterns). For a formal diagnosis, these obsessions or compulsions must consume at least an hour a day or cause significant problems in daily life. At their worst, they can be completely incapacitating.

OCD vs. Obsessive-Compulsive Personality Disorder

These two conditions sound similar but are fundamentally different. People with OCD recognize their thoughts as intrusive and unwanted. They don’t enjoy the rituals; they feel trapped by them. People with OCPD, a personality disorder, tend to see their rigid perfectionism, devotion to rules, and need for control as reasonable, even virtuous. They often lack awareness that their behavior is problematic. OCPD is considered a lifelong personality pattern present from early development, while OCD can develop at any point and responds well to treatment.

Why Most People With OCD Have Other Conditions Too

Having OCD alone is actually the exception. Between 62% and nearly 80% of people with OCD also meet criteria for at least one other psychiatric condition. Major depression is the most common, affecting an estimated 63% to 78% of OCD patients over their lifetime. This makes sense: the relentless cycle of anxiety and compulsions is exhausting and isolating, and depression frequently follows. Anxiety disorders, tic disorders, and panic symptoms are also common companions.

This overlap means that if you or someone you know develops OCD, the full picture may include fatigue, sleep problems, mood changes, and physical symptoms like a racing heart. These aren’t separate problems to worry about. They’re part of how OCD tends to show up in real life, and treating the OCD often improves the co-occurring symptoms as well.