What Is the Difference Between a Code and a Theme in Thematic Analysis?
A code is a short label attached to a small segment of data that captures one specific idea relevant to the research question. A theme is a broader, interpretive construct built by grouping related codes around a shared concept. Codes are the raw material; themes are what you build from it. Most confusion in thematic analysis traces back to skipping the second step and mistaking a cluster of codes for a finished theme.
This mix-up shows up constantly in dissertation drafts and manuscript reviews. A student codes forty transcripts, groups the codes into five neat piles labeled “Communication,” “Workload,” “Support,” “Training,” and “Management,” and calls them themes. A supervisor or reviewer then asks what each one actually says about the data. There's no answer, because a label like “Communication” describes a topic, not an argument. Getting this distinction right early saves weeks of rework later.
What a code actually is
Braun and Clarke (2006, p. 88) describe a code as identifying “a feature of the data (semantic content or latent) that appears interesting to the analyst.” In practice, a code is applied during the second phase of thematic analysis, after you've read through the dataset enough times to know its shape. You highlight a phrase, a sentence, or sometimes a whole paragraph, and attach a short tag that captures what's analytically relevant about it.
Codes work at the level of a single data extract. One transcript might generate thirty or forty of them. A code can be:
- Semantic — staying close to the explicit, surface meaning of what a participant said
- Latent — capturing an underlying assumption, idea, or ideology the researcher infers from the data (Braun and Clarke, 2006)
Say a nurse in an interview states: “I just don't have time to explain things properly to families anymore, so I rush it and hope they understood.” A semantic code might read “Time pressure limiting family communication.” A latent code on the same extract could read “Guilt over compromised care standards,” an interpretation of what sits beneath the surface statement.
Codes are numerous, granular, and close to the data. They're the building blocks. On their own, they don't tell you anything about the dataset as a whole.
What a theme actually is
Braun and Clarke (2006, p. 82) define it as something that “captures something important about the data in relation to the research question, and represents some level of patterned response or meaning within the data set.” Later work by Braun and Clarke sharpens this further, describing themes as patterns of shared meaning organized around a central organizing concept, an idea that unifies a set of codes into one coherent interpretation (Braun and Clarke, 2019).
This is the part most novice researchers miss. A theme is not a bucket you sort codes into by subject matter. It's a claim about what those codes mean when read together. DeSantis and Ugarriza (2000, p. 362) put it plainly in their widely cited review of the concept: “A theme is an abstract entity that brings meaning and identity to a recurrent experience and its variant manifestations.” The theme has to say something. It can't just point at a topic and stop there.
Going back to the nursing example: if codes like “Time pressure limiting family communication,” “Guilt over compromised care standards,” and “Rationing emotional labor across patients” keep showing up together, the theme they build toward might be named something like “Care under time scarcity forces nurses to ration compassion.” That's a theme. It's a sentence-length interpretive claim, not a one-word category.
The core distinction, side by side
| Feature | Code | Theme |
|---|---|---|
| Scope | Single data extract | Pattern across the dataset |
| Form | Short label or phrase | Short sentence expressing an idea |
| Function | Flags something of analytic interest | Interprets what a cluster of codes means together |
| Quantity per project | Often dozens to hundreds | Usually a handful — commonly 3 to 6 main themes |
| Produced in | Phase 2 of the six-phase process | Phase 3 onward, refined through Phases 4–5 |
The trap: mistaking a topic summary for a theme
This deserves its own section because it's the single most common critique in peer review and thesis defense. A topic summary (sometimes called a domain summary) groups codes that share a subject but stops there — it describes what participants talked about, not what the researcher is arguing the data means.
“Experiences of remote work” is a topic summary. It tells the reader that participants discussed remote work, but it makes no interpretive claim. A real theme built from the same codes might instead be “Remote work blurred the boundary between professional competence and personal availability” — a specific, arguable idea that the data extracts are then used to support.
Braun and Clarke have been explicit that this confusion is widespread even among researchers who cite their method directly (Braun and Clarke, 2019). If your “themes” could function as section headers in a purely descriptive report — no interpretation required — they are very likely topic summaries wearing a theme's name tag. For a fuller walkthrough of this specific failure mode, see our guide on the difference between a theme and a topic summary.
Why the distinction matters for your write-up
Reviewers and committees look for exactly this distinction because it signals whether the analysis went beyond surface description. A results section built on topic summaries reads like an annotated table of contents. A results section built on genuine themes reads like an argument, backed by coded extracts that earn their place as evidence.
Codes rarely appear as headings in a finished write-up. They're scaffolding, stripped away once themes are stable. Themes survive into the manuscript as subheadings, usually worded as short, declarative statements rather than bare nouns (Terry and Hayfield, 2021). If you're still working out how many themes is reasonable for a given project size, our guide on the six phases of thematic analysis covers how theme count tends to scale with dataset size.
Getting from codes to themes without losing rigor
Moving from forty scattered codes to five defensible themes is the hardest stretch of the process, and it's where most delays happen. It means clustering codes that share an underlying idea, writing a tentative central organizing concept for each cluster, then checking that concept against the original extracts to see if it holds. Revision is normal here; Braun and Clarke describe theme development as recursive, not linear (Braun and Clarke, 2006).
This is also the stage where doing it by hand across a large dataset gets genuinely slow. If you've already generated your codes and want to see candidate central organizing concepts drafted for you, with the underlying coded extracts kept visible so you can check every claim against the source data, you can run that clustering step through thematicanalysis.ai/analyze and have a first-pass theme structure in minutes rather than days. It won't replace the judgment calls described above, but it gives you a draft to react to and refine instead of a blank page.
The short version
A code names something specific happening in one piece of data. A theme makes a claim about a pattern of meaning across many pieces of data, held together by a central organizing concept rather than a shared subject line. If your themes could be topic sentences in a purely descriptive summary, they're not themes yet — go back to Phase 3 and ask what the codes are actually saying, together, about your research question.
References
- Braun, V. and Clarke, V. (2006) 'Using thematic analysis in psychology', Qualitative Research in Psychology, 3(2), pp. 77–101. Available at: https://doi.org/10.1191/1478088706qp063oa
- Braun, V. and Clarke, V. (2019) 'Reflecting on reflexive thematic analysis', Qualitative Research in Sport, Exercise and Health, 11(4), pp. 589–597. Available at: https://doi.org/10.1080/2159676X.2019.1628806
- Braun, V. and Clarke, V. (2022) Thematic Analysis: A Practical Guide. London: Sage.
- DeSantis, L. and Ugarriza, D.N. (2000) 'The concept of theme as used in qualitative nursing research', Western Journal of Nursing Research, 22(3), pp. 351–372. Available at: https://doi.org/10.1177/019394590002200308
- Terry, G. and Hayfield, N. (2021) 'Reflexive thematic analysis', in Ward, T. (ed.) Handbook of Qualitative Research in Clinical and Health Psychology. Cham: Springer, pp. 43–61.