Back to docs
Research Methods

Codes, Categories and Themes: What Is the Difference in Qualitative Analysis?

Codes label excerpts, categories group codes and themes make a claim about meaning. Definitions, one worked example, and five tests for telling a real theme from a topic.

A code is a short label for one piece of data, a category is a group of related codes, and a theme is a claim about what the data means for your research question. Codes describe, categories organise, themes interpret. Most weak qualitative reports stop at categories and call them themes, so the findings read like a list of topics ("Pricing", "Onboarding") rather than an answer.

This guide defines each level, shows one excerpt moving through all three, and gives tests for telling a real theme from a topic heading.

Try it now: take the headings from your last research report. If a heading still makes sense as a chapter title in a textbook ("Onboarding issues"), it is a category. If it is a sentence you could argue with ("People stall when setup needs someone else's approval"), it is a theme.

The three levels at a glance

Table comparing codes, categories and themes by what each is, its typical form, the question it answers, how you get there and an example.
Keep this next to your transcripts while you code · Download or share

What is a code?

Johnny Saldaña's Coding Manual for Qualitative Researchers gives the definition most researchers use: "A code in qualitative inquiry is most often a word or short phrase that symbolically assigns a summative, salient, essence-capturing, and/or evocative attribute for a portion of language-based or visual data."

In plain terms, a code is a tag you attach to an excerpt so you can find it again and compare it with others. Codes are close to the data. They can be:

  • Descriptive: a topic label in your words ("permissions setup").
  • In vivo: the participant's own phrase ("waiting on IT"). See in vivo coding.
  • Process codes: an action, usually a gerund ("working around the admin").
  • Evaluative or emotion codes: a judgment or feeling ("frustration with setup").

A study usually produces many codes, often dozens or more, and most transcripts contain several. How quickly new codes stop appearing is well studied. In Guest, Bunce and Johnson's analysis of 60 interviews, 73% of the codes they eventually used had appeared in the first 6 interviews and 92% within the first 12 (Field Methods, 2006). That is why code lists stabilise early, and why a stable code list does not yet mean you understand the data.

What is a category?

A category is a group of codes that share a property. It is the step where you sort your pile of labels into drawers. "Permissions setup", "waiting on IT", "inviting teammates" and "importing data" might all go into a category called Setup friction.

Categories are useful because they reduce hundreds of codes to a structure you can read. They are still descriptive, though. A category tells you what participants talked about. It does not yet tell you why that matters or what connects it.

Some traditions use different words for this level. Grounded theory talks about axial coding to build categories and their properties (see open, axial and selective coding). Saldaña's second cycle methods, such as pattern coding, do similar work (see first and second cycle coding). Template analysis and framework analysis build a hierarchy of codes that plays the same role (see framework analysis).

What is a theme?

Virginia Braun and Victoria Clarke, whose 2006 paper is the most cited guide to thematic analysis, define it this way: "A theme 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."

Two parts of that definition do the work:

  1. In relation to the research question. A theme answers the question you set out to ask. Lots of data about pricing is not a theme if your question was about onboarding.
  2. Patterned meaning. A theme is an idea that runs across participants and across categories. It often cuts through several categories rather than sitting inside one.

Saldaña makes a related point: a theme is an outcome of coding, categorising and reflection, not something you code directly. You do not find themes in the transcript; you build them from codes and categories, and then check them against the transcript.

From the Setup friction category, a theme might be: "People stall when setup depends on someone else's approval." That sentence also draws on codes from other categories, such as "manager sign-off for budget" from a Buying process category, and it makes a claim you can test against every transcript.

One excerpt, three levels

Here is a single excerpt, an illustrative one, traced from raw data to a theme:

  • Excerpt: "I gave up after the third screen asking for admin rights. I had to wait for IT."
  • Code: waiting on IT
  • Category: Setup friction
  • Theme: People stall when setup depends on someone else's approval.
Process showing one interview excerpt becoming a code, then a category, then a theme about stalling when setup needs approval.
Each step moves further from the words and closer to an answer · Download or share

Notice that the theme is the only level that could be wrong in an interesting way. A code is either a fair label or not. A theme is an argument, so you have to show the evidence for it and look for cases that do not fit (see negative case analysis).

Why the difference matters

Hennink, Kaiser and Marconi showed the cost of stopping early. In a study of 25 in-depth interviews, they found "code saturation", the point where no new codes appeared, at 9 interviews. "Meaning saturation", where they understood the codes well enough to explain them, needed 16 to 24 interviews (Qualitative Health Research, 2017). Their framing is that code saturation means you have "heard it all", while meaning saturation means you "understand it all".

In other words: having all the codes, or a tidy set of categories, is not the same as having themes. If you report categories as findings, readers get a map of what people mentioned and have to do the interpretation themselves. See data saturation for how to judge when you have enough.

Tests for a real theme

Use these five checks on every theme before it goes into a report:

  1. Is it a sentence? "Onboarding" is a topic. "People stall when setup needs approval" is a theme.
  2. Does it answer the research question? If you removed it, would the answer change?
  3. Does it span participants? A striking story from one person is a case, not a pattern. Report it as such.
  4. Can you show the evidence? Each theme should point to the codes and quotes behind it. If you cannot find three good quotes, it may be a hunch.
  5. Could someone disagree? If no reasonable reader could argue with it, it is probably a description, not an interpretation.

The same checks help with stakeholders. When someone asks "is that a finding or a topic?", you can show the path from excerpt to code to theme.

Working as a team: agreeing what counts as a theme

When two or more people analyse the same interviews, disagreements tend to happen at different levels. Disagreement about codes is about labelling and is usually settled with a shared codebook. Disagreement about themes is about interpretation, and it is often productive. Sit together with the codes and the quotes on the table, and argue over which sentence best captures what is going on. The theme that survives that conversation is usually stronger than either first draft. Agreement scores are useful for codes; for themes, a written rationale is more useful (see inter-rater reliability).

Two colleagues sorting sticky notes on a wall as they argue over which theme best fits their interview codes
Two colleagues sorting sticky notes on a wall as they argue over which theme best fits their interview codes

Photo by Vitaly Gariev on Unsplash

Common mistakes

  • Calling categories themes. The most common one. Rewrite each heading as a claim.
  • One-word themes. "Trust", "Speed", "Cost". These are areas, not findings.
  • Themes that copy your interview guide. If every theme matches a question you asked, you have summarised answers question by question, which Braun and Clarke call a "topic summary". It can be useful, but it is not thematic analysis.
  • Counting codes as if counts were themes. How often a code appears tells you about frequency, not meaning. Use counts as context (see how to quantify qualitative data).
  • Too many themes. A report with fifteen themes usually has fifteen categories. Most good studies settle on a handful.

How Koji helps

Koji does the first two levels for you and makes the third easier to check. It does not replace your interpretation, and its labels should be read with this guide in mind.

  • Codes on every answer. After each interview, Koji codes each answer the participant gave: mostly descriptive codes, with the participant's own phrasing kept as an in vivo code when it says something a topic label would miss. Each code is tied to the part of the conversation it came from.
  • Codes grouped across interviews. For each open question, Koji groups related codes from all interviews and shows how many interviews mention each group. In this guide's terms, those groups are closer to categories than to themes: they tell you what people talked about.
  • Evidence behind every group. Click a group to see the codes that fed it and the quotes behind them, and open each quote in the transcript. Quotes are checked against the transcript, and a quote that cannot be found in it is not shown.
  • Findings with their support. The report's key findings state a claim and show the share of participants behind it, with a link to the supporting responses, which is where you test whether a finding is a theme you would stand behind.
Koji high-impact finding card backed by 26% of participants with a link to supporting responses
A finding states a claim and shows who supports it, so you can check it like a theme

A good way to work: let Koji produce the codes and groups, then write your themes as sentences on top of them, and use the evidence links to check each sentence against the transcripts. When a study needs a formal codebook or a second coder, export the conversations as CSV or JSON.

Related Resources

Sources

  • Braun, V., and Clarke, V. (2006). Using thematic analysis in psychology. Qualitative Research in Psychology, 3(2), 77–101.
  • Guest, G., Bunce, A., and Johnson, L. (2006). How many interviews are enough? An experiment with data saturation and variability. Field Methods, 18(1), 59–82.
  • Hennink, M. M., Kaiser, B. N., and Marconi, V. C. (2017). Code saturation versus meaning saturation: how many interviews are enough? Qualitative Health Research, 27(4), 591–608.
  • Saldaña, J. The Coding Manual for Qualitative Researchers. SAGE.