Data Types Descriptive Statistics Variables 22 min read July 20, 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Discrete vs Continuous Data: How to Tell Them Apart

A hospital counts the number of patients admitted each day. A meteorologist records overnight rainfall in millimeters. A teacher notes how many absences each student has. A physiologist measures resting heart rates. These are four different datasets — but they split cleanly into two categories: values that are counted and values that are measured. That split defines the difference between discrete and continuous data, and it determines which statistical methods, graphs, and models apply.

This guide covers both definitions with precision, walks through the COUNT classification framework, provides 25 real-world datasets with explanations, answers the most common edge-case questions (is age discrete or continuous? is time discrete or continuous?), and includes an interactive data type classifier you can use on any variable.

What You'll Learn
  • ✓ Precise definitions of discrete and continuous data with statistical context
  • ✓ The COUNT framework — a five-step classification method
  • ✓ 25 real-world examples with explanations: education, healthcare, finance, manufacturing
  • ✓ Answers to the trickiest edge cases — age, time, money, temperature, shoe size
  • ✓ Histogram vs bar chart: which graph goes with which data type
  • ✓ An interactive variable classifier you can use right now
  • ✓ How the distinction matters in machine learning and data science

What Are Discrete and Continuous Data?

Definition — Discrete Data
Discrete data consists of countable values that can only take specific, separate numbers. There are gaps between possible values — no intermediate values are meaningful. Discrete data comes from counting, not measuring.
Examples: 0, 1, 2, 3, 4 children  |  7 goals scored  |  23 students present
Definition — Continuous Data
Continuous data can take any value within a given range, including fractions and decimals. There are no gaps between possible values — any point on a number line within the range is achievable, at least in theory. Continuous data comes from measuring.
Examples: 1.73 m tall  |  68.4 kg  |  36.8°C  |  14.27 seconds

The single most reliable test is this: ask whether the value was counted or measured. Counting produces discrete data; measuring produces continuous data. The number of cars in a parking lot is counted — it is 47 or 48, never 47.3. The weight of each car is measured — it could be 1,423.7 kg.

A second test: ask whether a fractional value is meaningful. Half a car (0.5) has no real-world meaning, so the number of cars is discrete. Half a kilogram (0.5 kg) is entirely meaningful, so weight is continuous. This "meaningful fraction" test catches most borderline cases.

📌
One-Sentence Answer for Featured Snippets

Discrete data is counted and can only take specific whole-number values (such as the number of students in a class), while continuous data is measured and can take any value within a range, including decimals (such as a student's height in centimeters).

Discrete

Discrete Data

  • Obtained by counting
  • Values are whole numbers (integers)
  • Gaps exist between possible values
  • Finite or countably infinite
  • Graphed with bar charts
  • Modeled with Binomial, Poisson distributions
Continuous

Continuous Data

  • Obtained by measuring
  • Values can be decimals or fractions
  • No gaps — any value in a range is possible
  • Uncountably infinite possible values
  • Graphed with histograms
  • Modeled with Normal, Exponential distributions

Discrete vs Continuous Data — Full Comparison Table

The table below captures every dimension statisticians use to distinguish these two data types, from data collection to appropriate inferential tests.

Feature Discrete Data Continuous Data
How obtainedCountingMeasuring
Possible valuesSpecific, separate numbersAny value within a range
Fractions meaningful?No (usually)Yes
Gaps between valuesYesNo
Number scaleFinite or countably infiniteUncountably infinite
Data typeInteger (whole number)Real number
Graph typeBar chart, dot plotHistogram, frequency polygon
Central tendencyMode, median, meanMean, median
Probability modelBinomial, Poisson, GeometricNormal, Exponential, Uniform
Probability notationP(X = k) — exact probabilityP(a ≤ X ≤ b) — interval probability
Common testsChi-square, binomial testt-test, ANOVA, z-test
ML feature typeCategorical / integer featureNumerical / float feature
Classic examplesNumber of defects, children, goalsTemperature, height, weight, time
Statistical classification framework based on definitions in Moore, D.S., McCabe, G.P. & Craig, B.A. (2012). Introduction to the Practice of Statistics (8th ed.), W.H. Freeman; and the NIST Engineering Statistics Handbook — Data Types.

The COUNT Framework: 5 Steps to Classify Any Variable

When you encounter an unfamiliar variable and need to determine whether it is discrete or continuous, work through these five steps. This original framework is designed to handle edge cases that trip up most beginners.

Classification Framework — Discrete vs Continuous Data

The COUNT Framework

C
Check whether values are counted or measured If the value answers "how many," it is counted → discrete. If it answers "how much," it is measured → continuous.
O
Observe whether fractions are possible and meaningful Ask: could this variable equal 2.5? If yes and 2.5 carries real meaning (2.5 liters), continuous. If 2.5 is nonsensical (2.5 people), discrete.
U
Understand the unit of measurement Measurement units like cm, kg, °C, and seconds signal continuous data. Count units like "items," "occurrences," or "cases" signal discrete data.
N
Note how the data were collected Review the data collection instrument. Scales and rulers produce continuous data. Tallies and registers produce discrete data.
T
Test with a real-world example Plug in a realistic value and ask whether a neighboring decimal would also be realistic. 5 absences → 5.3 absences? No. 68 kg → 68.3 kg? Yes.

Decision Tree: How to Classify a Variable Step by Step

Use this decision tree whenever you need to classify a numerical variable. Follow each question in order; the first time you reach a definitive answer, you are done.

Variable Classification Decision Tree

Q1: Is the variable numerical (quantitative)?
If No → Not discrete or continuous (qualitative/categorical data)
Q2: Is the value obtained by counting?
If Yes → Discrete Data
Q3: Is the value obtained by measuring?
If Yes → Continuous Data
Q4: Could a meaningful decimal value exist between any two adjacent values?
If Yes → Continuous Data
Q5: Are the only possible values whole numbers with no intermediate values?
If Yes → Discrete Data

25 Real-World Examples of Discrete and Continuous Data

The examples below span six subject areas. For each dataset, the classification and the reasoning are given in full — exactly the format you need for homework, exams, or data analysis work.

Discrete Data Examples

Discrete Examples — Education & Healthcare

12 Examples of Discrete Data with Classification Reasoning

1

Number of students in a classroom: 28 students cannot become 28.5. Values are whole numbers obtained by counting. Discrete.

2

Number of goals scored in a soccer match: A team scores 0, 1, 2, 3, or more goals — never 2.7. Counted from game events. Discrete.

3

Number of defective items per production batch: Quality control counts rejects: 0, 1, 2, … A batch cannot have 1.4 defects. Discrete.

4

Number of hospital admissions per day: The admissions register shows 47 patients on Monday. 47.5 admissions cannot occur. Discrete.

5

Number of children per household: Census data: 0, 1, 2, 3, 4 children. A household cannot have 1.5 children as a measured outcome. Discrete.

6

Number of customer complaints per week: A complaints log counts calls: 12 on Monday, 7 on Tuesday. Fractions are meaningless here. Discrete.

7

Number of cars passing a checkpoint per hour: Traffic counters record integers. 143 cars, not 143.2. Discrete.

8

Number of website visitors per day: Web analytics reports a daily visitor count. A site cannot have 10,482.4 unique visitors. Discrete.

9

Number of books in a library: The catalog count is always a whole number. A library holds 34,291 books, not 34,291.7. Discrete.

10

Number of eggs in a nest (biology): A bird's nest contains 3 or 4 eggs, never 3.5 eggs. Count data from field observation. Discrete.

11

Number of customer transactions per day (retail): A point-of-sale system logs 284 transactions on a Tuesday. Fractions do not apply. Discrete.

12

Number of absences per student per semester: Attendance registers count whole days absent: 0, 1, 2, 3. Half-day absences are tracked separately as a different variable. Discrete.

Continuous Data Examples

Continuous Examples — Science, Finance & Healthcare

13 Examples of Continuous Data with Classification Reasoning

1

Height of students (cm): Measured with a stadiometer. Values like 168.4 cm and 172.1 cm are both meaningful. Any decimal within a plausible range is possible. Continuous.

2

Body weight (kg): A scale might read 68.3 kg. Between 68 and 69 kg lie infinitely many values. Continuous.

3

Daily rainfall (mm): A rain gauge records 14.7 mm. Rainfall is a physical quantity measured on a continuous scale. Continuous.

4

Blood pressure (mmHg): A sphygmomanometer records 118.5 / 76.2 mmHg. Physiological pressure varies continuously. Continuous.

5

Body temperature (°C): Normal body temperature might be 36.8°C, 37.1°C, or 37.04°C depending on measurement precision. Continuous.

6

Time to complete a task (seconds): A stopwatch records 45.72 seconds. Time is a ratio-scale continuous variable. Continuous.

7

Stock price (USD): A share might trade at $142.38 or $142.39. Prices can take any real positive value to two decimal places (and in practice any real number in tick-size terms). Continuous.

8

Amount of fuel in a tank (liters): The fuel gauge reads 34.7 L. Fluid volume is measured on a continuous scale. Continuous.

9

Crop yield per hectare (kg): Agricultural researchers measure output in kg/ha with decimal precision: 3,847.6 kg/ha. Continuous.

10

Distance run in a workout (km): A GPS watch records 8.43 km. Distance is a continuous ratio-scale measurement. Continuous.

11

Concentration of a chemical (mg/L): Lab analysis reports 0.034 mg/L of a contaminant. Chemical concentration is inherently continuous. Continuous.

12

Electricity consumption (kWh): A smart meter reads 312.47 kWh for the month. Energy is measured on a continuous scale. Continuous.

13

Salary (annual, USD): Annual compensation of $74,250.00 can include cents and bonuses that make it effectively continuous. Salary is measured as a monetary quantity, not counted as discrete units. Continuous.

Tricky Edge Cases: Is Age Discrete or Continuous?

These are the questions that come up most often in statistics courses and on data science forums — each one has a nuanced answer that depends on how the variable is used.

Variable When Discrete When Continuous
Age When recorded as whole years (e.g., "28 years old") and used as a count When measured in years and fractions (e.g., 28.37 years), or when age-at-event is the outcome
Time When counted in whole units (e.g., number of days, number of hours elapsed) When measured on a clock or stopwatch — duration is a continuous ratio-scale variable
Money / Salary When tracking transaction counts (number of purchases) When the amount itself is the variable — USD amounts can include cents and sub-cent fractions in algorithmic trading
Temperature Rarely treated as discrete; only when rounded to the nearest degree for a categorical analysis By nature — thermometers measure on a continuous scale; 36.8°C and 37.1°C are both valid
Shoe size In US/UK sizing systems (6, 7, 8, 8.5) — discrete ordered categories When foot length in millimeters is the underlying measure used to assign a size
Test score (0–100) When grades are whole integers on a fixed scale (62, 75, 89) When scored as a percentage with decimal precision (78.4%) or as a standardized score (z-score)
⚠️
The Age Question — The Right Answer

Age is biologically continuous (time elapses smoothly) but is often practically treated as discrete when recorded as whole years. For most statistical purposes, the classification depends on the level of precision in your dataset. If your data shows only whole-number ages, treat age as discrete. If it shows decimal ages or time-since-event, treat it as continuous.

Interactive Variable Classifier

Enter a variable name and answer the questions below to determine whether it is discrete or continuous. The classifier uses the COUNT framework and works through each step automatically.

Data Type Classifier

Bar Chart vs Histogram: Which Graph for Which Data?

One of the most practical consequences of classifying data correctly is choosing the right graph. Using a histogram for discrete data, or a bar chart for continuous data, misrepresents the structure of the distribution.

Feature Bar Chart Histogram
Used forDiscrete data or categorical dataContinuous data (grouped into intervals)
Bars touching?No — gaps between bars show distinct categoriesYes — no gaps reflect the continuous number line
X-axisCategories or individual valuesIntervals (bins) — e.g., 60–70 cm
Y-axisFrequency or count of each valueFrequency, relative frequency, or density
ExampleNumber of goals per game (0, 1, 2, 3…)Heights of 200 students (in 5 cm bins)
Distribution shapeIndividual bars show exact countsShape of bars reveals Normal, skewed, or bimodal distribution
Graph Selection Rule

Discrete data → bar chart (gaps between bars). Continuous data → histogram (no gaps). The presence or absence of bar gaps mirrors the presence or absence of gaps between possible data values.

For more on how to build and interpret these graphs, see the data visualization guide and the dedicated histogram maker and bar chart maker on Statistics Fundamentals.

Probability Distributions: Matching the Right Model

Once you know whether your data is discrete or continuous, you can select the appropriate probability distribution for modeling and inference.

📊

Binomial Distribution

Models the number of successes in a fixed number of independent trials. The count of heads in 10 coin flips is discrete — only 0 through 10 are possible.

📈

Poisson Distribution

Models the number of events occurring in a fixed time or space interval: customers per hour, defects per meter. Always discrete — you count whole events.

🔔

Normal Distribution

The most common model for continuous data. Heights, weights, measurement errors, and test scores in large populations often follow a roughly Normal distribution.

⏱️

Exponential Distribution

Models the continuous time between events — wait time until the next customer arrives, or time until a machine fails. Always continuous; time can take any non-negative value.

For the full treatment of each distribution with calculators, see the Binomial distribution, Poisson distribution, and Normal distribution guides. The underlying theory connects to random variables and their properties.

Discrete vs Continuous in Data Science and Machine Learning

The discrete/continuous distinction shows up in every stage of a data science workflow — from exploratory analysis to model selection to feature engineering. Misclassifying a feature can lead to wrong preprocessing steps and poor model performance.

Data Science Application

How Feature Type Affects Model Choice

In Python's pandas and scikit-learn, continuous features stored as float64 are treated differently from discrete features stored as int64 or categorical types. Applying standardization (mean = 0, standard deviation = 1) is appropriate for continuous features like income or temperature. Applying it to discrete count features like number of children distorts the meaning of the values.

Decision trees and random forests handle both types, but linear regression assumes continuous target variables, while logistic regression and Poisson regression handle categorical and count targets respectively. Getting the classification right is the first step in choosing the right model.

Task Discrete Data Approach Continuous Data Approach
Feature type in pandasint64 or categoryfloat64
Missing value imputationMode imputation or most frequentMean or median imputation
NormalizationUsually not applied to countsMinMaxScaler or StandardScaler
Regression modelPoisson regression (count outcomes)Linear regression
Visualization in EDABar chart, count plotHistogram, KDE plot, box plot
Distribution testChi-square goodness of fitShapiro-Wilk, Kolmogorov-Smirnov
Probability statementP(X = k) — exact valueP(a ≤ X ≤ b) — area under curve

For a full statistics workflow in data science, see the exploratory data analysis guide and statistics for data science.

Common Misconceptions and Mistakes

These are the errors that appear most often on statistics exams and in data analysis work. Each one has a direct correction.

Misconception Wrong Thinking Correct Understanding
Discrete = small numbers Discrete data must have only a few possible values Discrete data can have infinite values (0, 1, 2, 3, …). The key is that those values are countable whole numbers.
Money is always discrete Because we deal in whole cents, money must be discrete The dollar amount of a transaction is a continuous quantity. Currency is rounded for practical convenience, not because it is inherently discrete.
Rounded data is discrete Heights recorded as 170, 171, 172 cm are discrete Rounding continuous data does not change its type. Height is still continuous — the measurement was rounded to the nearest cm.
Histogram vs bar chart doesn't matter You can use a histogram for any numerical data Histograms are for continuous data. Bars in a histogram have no gaps because there are no gaps in the underlying values. Discrete data uses bar charts with gaps.
Continuous data can only be measured with instruments If you don't have a measuring device, the data must be discrete The classification depends on the nature of the variable, not the collection tool. Age, time, and temperature are continuous whether you use a clock, calendar, or thermometer.
Poisson distribution applies to continuous time Because Poisson involves time, it must model continuous data The Poisson distribution models discrete counts (events per interval). The time interval is fixed; the events counted are discrete whole numbers.

Where Discrete and Continuous Fit in the Full Data Classification System

Discrete and continuous are subcategories of quantitative (numerical) data, which itself is one branch of the broader data type hierarchy. Knowing where these types fit helps you navigate any discussion of measurement scales and statistical methods.

Level Type Subtypes Examples
Data Qualitative (Categorical) Nominal, Ordinal Eye color, survey rating (1–5), grade level
Data Quantitative (Numerical) Discrete, Continuous ← This page
Quantitative Discrete Finite discrete, Count (Poisson) Number of children, goals, defects
Quantitative Continuous Interval, Ratio Temperature, height, weight, time

For the complete guide covering all four measurement scales — nominal, ordinal, interval, and ratio — see types of data in statistics. To understand how data type connects to sampling, see the population vs sample guide.

Entity and Formula Glossary

The table below defines every key term used in discussing discrete and continuous data, formatted for easy reference and AI extraction.

Term Symbol Definition
Discrete dataX ∈ {0, 1, 2, …}Countable numerical data with gaps between possible values; obtained by counting
Continuous dataX ∈ ℝMeasurable numerical data that can take any value in a range; obtained by measuring
VariableX, YA characteristic or quantity that can take different values across observations
Quantitative dataNumerical data that answers "how many" or "how much"; includes both discrete and continuous types
Qualitative dataCategorical data that describes characteristics or labels, not numerical quantities
Count datak ∈ {0, 1, 2, …}A specific type of discrete data that counts the number of times an event occurs
Measurement datax ∈ ℝContinuous data obtained by applying a measuring instrument to a physical quantity
Frequency distributionf(x)A summary showing how often each value or range of values occurs in a dataset
HistogramA bar graph for continuous data where bars touch; x-axis shows intervals (bins), y-axis shows frequency
Bar chartA graph for discrete or categorical data where bars do not touch; each bar represents one category
Binomial distributionB(n, p)Discrete probability distribution of the number of successes in n independent Bernoulli trials
Poisson distributionPois(λ)Discrete probability distribution of the number of events in a fixed interval; mean = variance = λ
Normal distributionN(μ, σ²)Continuous probability distribution characterized by its bell-shaped curve; many natural quantities approximate it
Interval scaleA continuous measurement scale with equal intervals but no true zero (e.g., Celsius temperature)
Ratio scaleA continuous measurement scale with equal intervals and a true zero (e.g., height, weight, time)
PopulationNThe complete set of all individuals or items under study from which samples may be drawn
SamplenA subset of the population selected for study; used to make inferences about the population
Descriptive statisticsMethods for summarizing and describing a dataset, including mean, median, variance, and graphs
Probability densityf(x)A function for continuous variables where the area under the curve between two points gives the probability
Probability massP(X=k)The probability that a discrete random variable takes an exact value k

Frequently Asked Questions

Discrete data consists of countable values with distinct gaps between possible outcomes, such as the number of students in a classroom. Continuous data can take any value within a range, including decimal values, such as height, weight, or temperature. In simple terms, discrete data is counted, while continuous data is measured.
Age is inherently a continuous variable because time passes continuously. However, when age is recorded only as whole years, it is often treated as discrete for analysis. Whether age is considered discrete or continuous depends on the level of measurement in your dataset.
Time is a continuous variable because it can be measured to any level of precision. Although time is sometimes recorded in whole units such as days or minutes, the underlying variable remains continuous since smaller intervals always exist.
Height is continuous because it can take any value within a realistic range and can be measured with increasing precision. Recording height to the nearest centimeter or inch does not change its underlying continuous nature.
Weight is a continuous variable because it is measured rather than counted and can assume any value within a given range. The precision of the measurement depends on the accuracy of the measuring instrument.
Continuous data can be recorded or analyzed as discrete through rounding, grouping, or categorization. For example, recording heights to the nearest centimeter creates discrete values for analysis, although height itself remains a continuous variable.
The distinction determines which statistical methods, probability distributions, graphs, and predictive models are appropriate. Correctly identifying the data type helps ensure accurate analyses, meaningful visualizations, and valid statistical conclusions.
Count data records the number of times an event occurs or the number of objects observed. Because counts can only take non-negative whole-number values, count data is always discrete. Common examples include the number of customers, goals scored, or accidents reported.
Salary is generally treated as a continuous variable in statistical analysis. Although salaries are usually recorded in fixed currency units, they can take many closely spaced values and are measured rather than counted, making continuous methods appropriate in most applications.
Bar charts are commonly used for discrete data because each category or count is represented separately with gaps between bars. Histograms are used for continuous data because adjacent bars represent intervals of an uninterrupted range of values without gaps.

Discrete vs Continuous Data: Quick Reference Cheat Sheet

⚡ Complete Cheat Sheet — Discrete vs Continuous Data
  • Discrete = counted: Values are whole numbers; gaps exist between them; fractions are meaningless
  • Continuous = measured: Values can be any real number in a range; fractions are fully meaningful
  • Test 1 (Count or Measure?): Counted → discrete. Measured → continuous.
  • Test 2 (Meaningful fraction?): 2.5 people = impossible → discrete. 2.5 liters = meaningful → continuous.
  • Graph rule: Discrete → bar chart (gaps). Continuous → histogram (no gaps).
  • Distribution rule: Discrete → Binomial, Poisson, Geometric. Continuous → Normal, Exponential, Uniform.
  • Probability rule: Discrete → P(X = k) is meaningful. Continuous → P(X = k) = 0; use P(a ≤ X ≤ b).
  • Age: Continuous by nature; treated as discrete when recorded as whole years.
  • Time: Continuous — durations can take any non-negative real value.
  • Height, weight, temperature: Always continuous — they are physical measurements.
  • Goals, students, defects, cars: Always discrete — they are counts of whole objects.
  • Statistical tests: Continuous → t-test, ANOVA, z-test. Discrete/categorical → chi-square, Fisher's exact.

Mastering discrete and continuous data is the first step. These topics build directly on this foundation and are covered in full on Statistics Fundamentals:

📐

Types of Data in Statistics

The full data classification system: nominal, ordinal, interval, and ratio scales, with examples and measurement rules.

🔢

Random Variables

Discrete and continuous random variables, probability mass functions, probability density functions, and expected value.

🔔

Normal Distribution

The primary model for continuous data. Bell curve properties, the empirical rule, z-scores, and probability calculations.

🎯

Binomial Distribution

The primary model for discrete binary outcomes. Formula, mean, variance, and worked examples.

📊

Descriptive Statistics

Mean, median, mode, standard deviation, and variance — the summary statistics you apply to both data types.

🧪

Hypothesis Testing

Choosing between t-tests for continuous outcomes and chi-square tests for discrete/categorical outcomes.