Codes vs Themes in Thematic Analysis: The Difference Explained (With Examples)
If you have ever sat in front of your coded transcripts and thought “wait — is this a code or a theme?”, you are in extremely good company. It is the single most common thing students get tangled in when they first do thematic analysis, and it trips up plenty of experienced researchers too. The confusion is understandable, because the two words get used loosely in everyday research talk. But the distinction is real, it matters for your marks, and once it clicks you will never lose it again.
This guide explains the difference in plain language, shows you exactly how codes turn into themes with a worked example, and answers the question everyone quietly wants answered: how many codes make a theme?
The short answer
A code is a short label you attach to one small piece of data that captures a single idea. A theme is a broader, interpretive pattern that pulls several related codes together to say something meaningful. Codes are the bricks; themes are the wall you build with them (Braun & Clarke, 2006).
That is the whole distinction in one line. Everything else in this article is just making it concrete so it actually sticks.
What is a code, really?
A code is the most basic unit of your analysis. You read a line or a passage, notice it is about something, and give it a short descriptive label. Codes are meant to be small and specific — one idea each. Classic examples of initial codes are single words or short phrases like “financial worry,” “feeling ignored,” “waiting time,” or “family support” (MAXQDA, 2026).
A few things to hold onto about codes:
- They capture one idea, not a whole argument.
- They are usually descriptive and close to the data at first (“initial” or “open” codes).
- You will generate a lot of them — dozens, sometimes over a hundred — and that is normal.
If a “code” you have written feels like a sentence or a conclusion, it is probably trying to be a theme. Pull it back to a single idea.
What is a theme, really?
A theme sits at a higher level. It is not a label on one passage — it is a pattern of meaning that runs across your data, built by grouping related codes and interpreting what they add up to. Crucially, Braun and Clarke are emphatic on one point: a theme is not a summary of codes and not a bucket you pour codes into. It is an interpretive construct with a central organising idea (Braun & Clarke, 2006).
Put differently: a code says “this bit of data is about waiting times.” A theme says something like “Patients experience the system as indifferent to their time” — a claim about meaning that several codes, together, support.
The word “just” is the trap here. A theme is not just the codes gathered together; it is what those codes, read as a set, reveal.
A worked example: from codes to a theme
Here is how it looks in practice. Imagine you are studying the experiences of family caregivers. As you code interviews, you generate initial codes like these:
- “no time for myself”
- “gave up my job”
- “lost touch with friends”
- “always on call”
- “cancelled my own appointments”
Each of those is a code — one specific idea, close to what the participant said. Now you step back and ask: what pattern connects them? Every one of these codes points to the caregiver’s own life shrinking to make room for the person they care for. So you develop a theme:
Theme: “The disappearing self — how caregiving crowds out the carer’s own life.”
Notice what happened. The theme is not any single code. It is an interpretation that gives all five codes a shared meaning and a name that tells your reader something. That is the move from coding to theming, and it is exactly what earns marks in a qualitative analysis. (For the full method around this, see my step-by-step guide to thematic analysis.)
Codes vs themes: a quick comparison
| Feature | Code | Theme |
|---|---|---|
| Level | Low-level, specific | High-level, abstract |
| Captures | A single idea | A pattern of meaning |
| Nature | Descriptive | Interpretive |
| Size | Many (dozens+) | Few (often 3–6) |
| Example | “gave up my job” | “The disappearing self” |
| Role | Building block | What you build |
How many codes make a theme?
The honest answer: there is no magic number. A theme usually draws on several related codes, but a theme built from three rich, well-connected codes can be far stronger than one loosely stitched from fifteen. The test is not “how many codes?” but “does this capture a meaningful pattern in relation to my research question?” If yes, it earns the status of a theme. If it only describes one narrow point, it is probably still a code — or a sub-theme.
And yes, sub-themes exist for exactly this reason: sometimes a big theme has two or three distinct facets, each grouping its own codes. Use them when they add clarity, not to make your thematic map look busy.
The most common mistakes (and how to avoid them)
Three errors account for most of the confusion I see in supervision.
1. Themes that are really just codes. If your “theme” describes a single narrow idea (“waiting times”), it is a code wearing a theme’s coat. A theme needs a central organising concept that several codes feed into.
2. Themes that are really just topic summaries. “Challenges” or “Experiences” are not themes — they are domain summaries or bins. A real theme makes a point. “Challenges” tells the reader nothing; “Care that costs the carer their independence” does.
3. Deciding themes before coding. In reflexive thematic analysis, themes are developed from the coding, not imposed on it in advance. Let the codes come first, then build up. (If you are choosing your overall approach, my post on qualitative vs quantitative research sets the foundation.)
Where NVivo fits in
Software does not change any of this — it just organises it. In NVivo, both codes and themes are stored as “nodes,” and you build a hierarchy by nesting your code-nodes underneath broader theme-nodes. The thinking is still entirely yours; NVivo simply keeps the structure tidy and lets you retrieve every passage behind a theme in one click. If you want the mechanics, my beginner’s guide to NVivo walks through exactly how to set that up.
Frequently asked questions
What is the difference between a code and a theme?
A code labels a single idea in one segment of data; a theme is a broader interpretive pattern that groups several related codes into something meaningful. Codes are the building blocks of themes.
How many codes make a theme?
There is no fixed number. A theme usually pulls together several codes, but strength comes from a meaningful, well-connected pattern, not from a code count.
Is a theme just a summary of codes?
No. A theme is an interpretive construct with a central organising idea — not a bucket, bin or summary of the codes inside it.
Do codes come before themes?
Usually yes. In reflexive thematic analysis you code first, then search for and refine themes by grouping and interpreting those codes.
What is a sub-theme?
A distinct facet within a larger theme that groups its own set of codes. Use sub-themes when a theme genuinely has separate dimensions worth naming.
Final thought
Hold on to one image and you will never confuse them again: codes are bricks, themes are the wall. You make a lot of bricks, each one small and specific. Then you step back, see which bricks belong together, and build something that means more than the sum of its parts. That step back — from labelling to interpreting — is the whole craft of thematic analysis, and it is where your voice as a researcher finally shows up.
References
Braun, V., & Clarke, V. (2006). Using thematic analysis in psychology. Qualitative Research in Psychology, 3(2), 77–101. https://doi.org/10.1191/1478088706qp063oa
MAXQDA. (2026). Thematic analysis: Step-by-step guide. https://www.maxqda.com/research-guides/thematic-analysis
Quirkos. (2026). What is thematic analysis in qualitative research? https://www.quirkos.com/blog/post/what-is-thematic-analysis-qualitative-codes/
