[Home](https://learningfolio.de5.net/) / [Math](https://learningfolio.de5.net/math/) / [Math glossary](https://learningfolio.de5.net/math/glossary/) / Dependent and Independent Variables: How to Tell Them Apart

[Math glossary](https://learningfolio.de5.net/math/glossary/)

# Dependent and Independent Variables: How to Tell Them Apart

Identify dependent and independent variables in equations, graphs, experiments, and observational studies with six examples.

Written by **Learningfolio Team**

We’re subject-matter experts in math, science, parent support, and education, with 100 years of combined experience. We believe in learning, experimenting, and growing, and we review one another’s work.

## On this page

* [TL;DR](https://learningfolio.de5.net/math/dependent-and-independent-variable/#tldr)
* [Key Points](https://learningfolio.de5.net/math/dependent-and-independent-variable/#key-points)
* [What is the difference between dependent and independent variables?](https://learningfolio.de5.net/math/dependent-and-independent-variable/#what-is-the-difference-between-dependent-and-independent-variables)
* [How do you identify the variables in an equation, table, or graph?](https://learningfolio.de5.net/math/dependent-and-independent-variable/#how-do-you-identify-the-variables-in-an-equation-table-or-graph)
* [How do controlled and confounding variables fit?](https://learningfolio.de5.net/math/dependent-and-independent-variable/#how-do-controlled-and-confounding-variables-fit)
* [Can an analysis have several independent or dependent variables?](https://learningfolio.de5.net/math/dependent-and-independent-variable/#can-an-analysis-have-several-independent-or-dependent-variables)
* [Worked Variable Examples](https://learningfolio.de5.net/math/dependent-and-independent-variable/#worked-variable-examples)
* [Mistakes That Change Variable Identification](https://learningfolio.de5.net/math/dependent-and-independent-variable/#mistakes-that-change-variable-identification)
* [Try It Yourself](https://learningfolio.de5.net/math/dependent-and-independent-variable/#try-it-yourself)
* [Answers and Reasoning](https://learningfolio.de5.net/math/dependent-and-independent-variable/#answers-and-reasoning)
* [Frequently Asked Questions](https://learningfolio.de5.net/math/dependent-and-independent-variable/#frequently-asked-questions)
* [Conclusion](https://learningfolio.de5.net/math/dependent-and-independent-variable/#conclusion)
* [Read More](https://learningfolio.de5.net/math/dependent-and-independent-variable/#read-more)
* [Research Behind This Article](https://learningfolio.de5.net/math/dependent-and-independent-variable/#research-behind-this-article)

## TL;DR

**An independent variable supplies the input or comparison condition. A dependent variable is the outcome calculated or measured.** Use the rule’s input or the study’s comparison condition to identify which variable comes first.

## Key Points

* In $y=f(x)$, $x$ is the input and $y$ is the output.
* In a controlled experiment, researchers change or assign an independent variable and measure a dependent one.
* In an observational study, an explanatory variable can be measured without being assigned.
* The horizontal axis often shows the input or explanatory variable. Read the labels to confirm.
* The names describe roles in a question. They do not establish cause by themselves.

## What is the difference between dependent and independent variables?

A **variable** represents a value or category that can differ. An **independent variable** is the input to a rule or a condition used to compare observations. A **dependent variable** is the result computed from the rule or the response measured.

| Setting | Independent or explanatory variable | Dependent or response variable |
| --- | --- | --- |
| Function | An input given to the function | The corresponding output |
| Controlled experiment | A condition deliberately assigned or changed | What researchers measure after setting the condition |
| Observational study | A predictor recorded for comparison | The outcome described or predicted |

The roles depend on what you ask. If a recipe scales ingredient mass from the number of servings, servings are the input. If you start with the available ingredients and calculate the number of servings, that calculation reverses the roles. [National Center for Education Statistics, Independent and Dependent Variables](https://nces.ed.gov/nceskids/pdf/graph_tutorial.pdf)

![A graph puts notebooks on the horizontal axis and the total cost on the vertical axis](https://learningfolio.de5.net/assets/versioned/independent-dependent-variable-input-graph.0d940ef70e1a.webp)


The number of notebooks is chosen first. The cost is the corresponding output.

## How do you identify the variables in an equation, table, or graph?

Read the question as “what changes or is supplied?” and “what result do we calculate?” In

$$
C(n)=3n+5,
$$

$n$ is the number of notebooks and $C(n)$ is the total cost in dollars. The 3 is the price per notebook and 5 is a fixed charge in this model. Those fixed values are parameters in this calculation. The [function input and output guide](https://learningfolio.de5.net/math/functions-domain-range-and-input-output/) explains why each allowed input has one corresponding output.

A table may put the input in the first column. A graph often places the independent variable on the horizontal axis and the dependent variable on the vertical axis. Read axis labels because a graph can be arranged differently. Use units when you write conclusions. “The cost rises by 3 dollars per notebook” conveys direction and rate. [OpenStax, Rectangular Coordinate System](https://openstax.org/books/prealgebra-2e/pages/11-1-use-the-rectangular-coordinate-system)

## How do controlled and confounding variables fit?

A **controlled variable** is a condition the study keeps the same, such as the size of a container when comparing different amounts of water. A **confounder** is an outside factor that is associated with the explanatory variable and can also affect the outcome. It can make an apparent relationship harder to interpret.

For example, when measuring the time it takes ice to melt in rooms at different temperatures, measure or control the cube size, exposure to sunlight, and container type. If all warmer rooms also get direct sunlight, the results may reflect both factors. A well-designed experiment can help separate them. A [scatter plot](https://learningfolio.de5.net/math/scatter-plot/) can display an association, but the design is what supports a causal interpretation. [OpenStax, Analyzing Findings](https://openstax.org/books/psychology-2e/pages/2-3-analyzing-findings)

## Can an analysis have several independent or dependent variables?

Yes. A model might predict trip time from distance and traffic level. Both are explanatory variables and trip time is the response. An experiment might measure two responses under the same condition, for example time to finish a task and the number of errors. Describe each variable’s role and units in the particular analysis.

The phrase **independent variable** does not mean the inputs are statistically independent of one another. Two explanatory variables can be related. Whether researchers can separate their influence depends on the data and design. [Scribbr, Independent and Dependent Variables](https://www.scribbr.com/methodology/independent-and-dependent-variables/)

## Worked Variable Examples

### Example 1

A booth charges 5 dollars to enter and 3 dollars per notebook purchased. Calculate the total for four notebooks and identify the variables.

1. The number $n$ of notebooks is the input.
2. The cost $C(n)=3n+5$ is the output.
3. Four notebooks cost $3(4)+5=17$ dollars.

### Example 2

A runner follows the model $d=4t$, with time $t$ in seconds and distance $d$ in metres. What happens over 6 seconds?

1. The time $t$ is the independent input.
2. Distance $d$ is the dependent output.
3. At $t=6$, the distance is 24 metres. The slope represents 4 metres per second.

### Example 3

A class changes the amount of light reaching identical solar-powered toy cars and records their speed.

1. The light level is the independent variable because it is changed on purpose.
2. Car speed is the dependent variable because it is measured.
3. Use the same track slope and car setup to keep those conditions controlled.

### Example 4

A survey compares night-time sleep hours and next-day reaction times without assigning anyone to a sleep schedule.

1. Sleep hours can be the explanatory variable in a model of reaction time.
2. Measured reaction time is the response.
3. Because the study is observational, a relationship alone leaves other explanations open, such as differences in work schedules.

### Example 5

A graph puts parcel mass on the horizontal axis and shipping cost on the vertical axis. A point appears at $(2,11)$.

1. The horizontal value represents mass, so it is the plotted input.
2. The vertical value gives the cost.
3. The point means a parcel of mass 2 in the graph’s units costs 11 in the currency used.

### Example 6

A model estimates the number of garden tiles from path length and width using $N=lw/0.25$. Both lengths are in metres. Find $N$ for a 3-by-2-metre path.

1. Length $l$ and width $w$ are two inputs.
2. Each tile covers $0.25$ square metre in the model.
3. The tile count is the dependent output, $N=3(2)/0.25=24$.

## Mistakes That Change Variable Identification

### Mistake 1: Choosing variables from their letters alone

$x$ is often an input, but a problem can use any letter. Read what each variable represents.

### Mistake 2: Treating a controlled variable as the factor being tested

A control is a condition kept fixed for comparison. The tested condition changes across observations or groups.

### Mistake 3: Claiming cause from an axis label

The horizontal axis can display a predictor in observational data. That label does not show that changing the predictor would change the outcome.

## Try It Yourself

1. In $F=1.8C+32$, use Celsius as the input. Identify the output and find it when $C=20$.
2. An experiment changes the angle of a ramp and measures how long a ball takes to roll down. Identify both variable roles.
3. A study records practice time and quiz scores without setting anyone’s practice time. Which variable might be used to predict score?

## Answers and Reasoning

1. Fahrenheit $F$ is the dependent output. The reading is $1.8(20)+32=68^\circ\mathrm{F}$.
2. Ramp angle is the independent variable, and roll time is the dependent one.
3. Practice time is the possible explanatory variable; the score is the response.

## Frequently Asked Questions

### Is the independent variable always on the x-axis?

It often appears there in a function graph or scatter plot. Always check the axis labels, particularly when reading a nonstandard display.

### Can a dependent variable be categorical?

Yes. A recorded result might be pass or fail, or a selected category. It can still serve as the measured response.

### Can the same variable be an input in one question and an output in another?

Yes. Distance can be an output calculated from time at a known speed, or an input used to calculate time. The chosen rule determines the role.

## Conclusion

* Read the question to identify the input or comparison condition.
* Name what is calculated or measured as the outcome.
* Use the design to decide whether a relationship supports causal interpretation.

## Read More

* [Plot ordered pairs and read axis labels](https://learningfolio.de5.net/math/coordinate-plane-and-ordered-pairs/)
* [Find how fast an output changes with its input](https://learningfolio.de5.net/math/rate-of-change-formula/)

## Research Behind This Article

1. National Center for Education Statistics, *What Are Independent and Dependent Variables?* [NCES](https://nces.ed.gov/nceskids/pdf/graph_tutorial.pdf)
2. OpenStax, *Prealgebra 2e: Use the Rectangular Coordinate System*. [OpenStax](https://openstax.org/books/prealgebra-2e/pages/11-1-use-the-rectangular-coordinate-system)
3. OpenStax, *Psychology 2e: Analyzing Findings*. [OpenStax](https://openstax.org/books/psychology-2e/pages/2-3-analyzing-findings)
4. University of Tasmania, *Interpreting Tables and Graphs*. [University of Tasmania](https://www.utas.edu.au/mathematics-pathways/pathways-to-health-science/module-13-interpreting-tables-and-graphs)
5. Scribbr, *Independent vs. Dependent Variables*. [Scribbr](https://www.scribbr.com/methodology/independent-and-dependent-variables/)
