TapCub is live — analytics, insights and live chat, free on one platform
Glossary

What is categorical data? Types, examples and how to analyze it

Categorical data sorts records into groups, such as channel, device or country, instead of measuring an amount. Types, how to summarize it with counts, shares and the mode, and traps to avoid.

Su He Reviewed by Chen Yu Also called qualitative data Last updated Nov 19, 2026 Glossary

Quick answer

Categorical data is data that places each record in a group or label, such as channel, device, country or plan, instead of measuring an amount. You can count and compare groups, but you cannot meaningfully add or average the values themselves.

Formula: Share of group = count of group ÷ total records

What is categorical data?

Categorical data is data that puts each record into a group instead of measuring an amount. Traffic channel, device type, country, plan name, browser and "bought or not" are all categorical: every visitor falls under one label, and the labels are what you count.

The test is simple: does arithmetic on the values make sense? The average of 120 and 150 sessions is 135 sessions, which means something. The average of "mobile" and "desktop" does not exist. If you can count the rows in each group but cannot add, subtract or average the values themselves, the data is categorical. The measurement-scale idea goes back to Stevens (1946), who separated nominal and ordinal scales from interval and ratio ones. This page is about the data itself and how to summarize it; the same idea seen as a column in a table is a categorical variable, and the full set of kinds is in data types.

What are the types of categorical data?

TypeRuleExamplesWhat you can do
NominalLabels with no natural orderChannel, device, country, browserCount, share, mode
OrdinalLabels with a meaningful order but unequal gapsSatisfaction (1–5), plan tier (Free, Pro, Business), "never / sometimes / often"Everything above, plus rank, median, percentile of rank
BinaryOnly two values (a special case)Bought or not, logged in or notCount, share (a rate)

The gap between ordinal levels is not guaranteed to be equal: the step from "satisfied" to "very satisfied" is not necessarily the same size as the step from "neutral" to "satisfied". That is why a median is safe for ordinal data and a mean is only an approximation. See ordinal variable and ordinal data examples.

How is categorical data different from numerical data?

CategoricalNumerical
ValuesLabelsNumbers with meaning
Typical summaryCounts, shares, modeMean, median, spread
Typical chartBar chart, tableHistogram, line, scatter plot
Typical questionWhich group is biggest?How much, how many?
Edge caseAge bands ("25–34") are categoricalExact age is numerical

The edge case matters: the same fact can be either, depending on how it is recorded. Binning a number into bands loses detail and turns it into a category. A number that is really an ID (a postcode, a product code) is categorical too, even though it looks numeric.

How do you summarize categorical data?

You have three tools: count, share (count ÷ total), and mode (the largest group). You can also compare an outcome rate across groups.

Sample data: 1,000 sessions on a site, with orders placed.

DeviceSessionsShare of sessionsOrdersConversion rate
Mobile56056.0%285.0%
Desktop38038.0%3810.0%
Tablet606.0%23.3%
Total1,000all sessions686.8%
  1. Count and share. 560 ÷ 1,000 = 56.0% of sessions are mobile. The mode is Mobile.
  2. Outcome by group. Desktop converts at 38 ÷ 380 = 10.0%, twice the mobile rate of 28 ÷ 560 = 5.0%.
  3. Read both together. Mobile is the biggest group but converts at half the desktop rate, which is a more useful finding than either column alone.
  4. Mind small groups. Tablet has 2 orders: one more or less moves its rate by 1.7 points. Do not draw conclusions from 2 events.

What goes wrong when you treat categories as numbers?

Spreadsheets and databases often store categories as codes: Mobile = 1, Desktop = 2, Tablet = 3. The codes are still labels. Averaging them gives (560 × 1 + 380 × 2 + 60 × 3) ÷ 1,000 = 1.5, which says nothing; "between mobile and desktop" is not a device. The same applies to any averaged or summed ID.

The ordinal case is subtler. Averaging a 1–5 satisfaction score is common practice, but it assumes the steps are equal. Report the distribution (share per level) next to any average.

What if a category has too many values?

Cardinality is the number of distinct values. A device column has a handful; a page URL or a search term can have thousands, and each has only a few rows. A bar chart with 500 bars is unreadable, and shares become noise.

Practical rules:

  • Show the top 10 and group everything else as "Other", then state how much "Other" holds.
  • Merge near-duplicates before counting (utm_source = "Google" and "google"; "/pricing" and "/pricing/").
  • Group into a parent level (page → section, city → country).
  • For modelling, high-cardinality categories need special encoding; the Google Machine Learning Crash Course covers the common ones.

Which charts and checks suit categorical data?

  • Bar chart sorted by size for nominal data; keep the natural order for ordinal data.
  • Table with count, share and an outcome rate.
  • Avoid pie charts with more than five slices.
  • Check that groups are exclusive and complete. Each row should belong to exactly one group; add an explicit "Unknown" rather than dropping blanks.
  • Compare shares with counts shown. 50% of 4 and 50% of 4,000 are not equally trustworthy.

Common mistakes with categorical data

  • Inconsistent labels. "US", "USA" and "United States" are three groups until you merge them; shares for each look smaller than the truth.
  • Dropping blanks. If 8% of sessions have no country, a table that silently leaves them out overstates every other share. Show "Unknown".
  • Comparing shares across different bases. Mobile is 56% of sessions but could be 40% of revenue; always say what the percentage is of.
  • Reading a rate from a tiny group. Two orders out of 60 is 3.3%, and one more order makes it 5.0%.
  • Treating overlapping categories as exclusive. A visitor who used two browsers belongs to two rows, so the shares can add to more than 100%.

How do you look at categorical data in TapCub?

In analytics tools, categories are the dimensions you break numbers down by. Starting from the device example above:

  1. Open a breakdown. Web analytics › Audience lists browser, operating system, device type and country with visitors, pageviews, bounce, average duration and share per row. Web analytics › Sources does the same for channels and UTM parameters.
  2. Compare an outcome across groups. Click a row to add it as a filter, then open Web analytics › Goals to see goal conversions for that group only. Real people are counted separately from bots, so crawlers do not inflate a category such as "Desktop".
  3. Look at your own event properties. All-platform analytics › Data › Events & properties shows counts, unique visitors and share for each event and a breakdown of property values, which is where a category like "plan" or "button label" appears.
  4. Watch the long tail. All-platform analytics › Data › Data quality has a High cardinality tab that flags properties with too many distinct values, such as a URL stored in a property. In All-platform analytics › Data › Property dictionary, a whitelist of allowed values keeps those values and stores everything else as __other, which is the "top N plus Other" rule applied at collection time.
  5. Know what TapCub does not do. It counts and shares categories; it does not run chi-square or other significance tests, so judge small groups yourself with the rule of thumb above.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Su He

Data Analyst

Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What are examples of categorical data?

Traffic channel, device type, country, browser, plan name, payment method, and yes/no answers such as 'bought or not'. Ordinal examples are satisfaction ratings (1 to 5) and plan tiers. Each record carries one label, and you count how many fall under each.

What is the difference between nominal and ordinal data?

Nominal categories have no natural order, such as device or country. Ordinal categories have a meaningful order but unequal gaps, such as 'never, sometimes, often'. For ordinal data you can use ranks and the median; for nominal data you are limited to counts, shares and the mode.

Is age categorical or numerical?

Exact age is numerical. Age bands such as '25–34' are categorical, because binning a number into groups turns it into a label and loses detail. The same fact can be either, depending on how it is recorded.

How do you analyze categorical data?

Count each group, compute its share of the total and find the mode. Then compare an outcome rate, such as conversion, across groups, showing the counts so small groups are not over-read. Use bar charts, and group long tails into 'Other'.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics