Independent Variable

Definitionnoun phrase

What is an independent variable in math?

An independent variable is an input value that can be chosen or changed. The dependent variable changes based on it. In y = 3x, x is the independent variable and y is the dependent one. On a graph the independent variable goes on the horizontal axis; in an experiment it is the factor you change on purpose.

In Spanish
variable independiente
Also called
input variable, explanatory variable, manipulated variable
Grade level
6-8
Grade 6Grade 7Grade 8Algebra 1CCSS 6.EE.C.9CCSS 8.F.B.4SATACT

Independent Variable in a picture

Independent and dependent variables on a graphA graph of pay P = 15h. Hours worked, h, the independent variable, is on the horizontal axis from 0 to 4. Pay in dollars, P, the dependent variable, is on the vertical axis from 0 to 60. Points at (1, 15), (2, 30), (3, 45) and (4, 60) lie on a line. A table on the right lists the same pairs with h in the first column.dependent (output):pay P, dollars0123415304560hours worked, hindependent (input)P = 15hhP115230345460you choose h;P depends on h
The quantity you choose, hours, is independent and goes across the bottom. The quantity that results, pay, is dependent and goes up the side: pay depends on hours, not the other way round.

Formal definition and notation

In a relationship between two quantities written as y = f(x), the independent variable x can take any value in the domain, and the value of the dependent variable y is determined by it. Which variable is independent comes from the situation: it is the quantity that comes first, is controlled or chosen, or is the cause being studied. By convention it is graphed on the horizontal axis and listed in the first column of a table.

Symbol Read it as Meaning
x x the usual letter for the independent variable
f(x) f of x the output, which depends on the independent variable x
t t time, a common independent variable in word problems

Key facts

  • Use the sentence test: “__ depends on __.” The quantity after “depends on” is the independent variable: pay depends on hours worked.
  • The independent variable is usually the input, not the result.
  • It goes on the horizontal axis (the x-axis) of a graph and in the first column of a table.
  • In a science experiment, it is the one thing the experimenter changes on purpose, such as the amount of fertilizer.
  • Time is very often the independent variable: distance, temperature and savings depend on time, not the other way round.

Try it: choose the input

Interactive

The machine pays 15 dollars per hour. Type any number of hours (the independent variable) and press Run to see the pay it produces (the dependent variable). Each new input you choose sets a new output.

This interactive needs JavaScript. The worked examples below show the same ideas step by step.

Independent Variable examples, step by step

Example 1: Name the variables

Warm-up

Gas costs 2.50 dollars per gallon, so C = 2.5g, where C is the cost in dollars and g is the number of gallons. Which variable is independent? Find the cost of 8 gallons.

  1. Sentence test: the cost depends on the number of gallons, not the other way round.
  2. So g is the independent variable and C is the dependent variable.
  3. Choose g = 8: C = 2.5 × 8 = 20.

Answer: g (gallons) is independent; 8 gallons cost 20 dollars.

Example 2: Write the equation from words

Core

A seedling is 5 cm tall and grows 2 cm each week. Write an equation for its height, name the independent variable, and find the height after 6 weeks.

  1. The height depends on the number of weeks, so weeks w is the independent variable and height h is dependent.
  2. Start at 5 cm and add 2 cm per week: h = 5 + 2w.
  3. Choose w = 6: h = 5 + 2(6) = 5 + 12 = 17.

Answer: h = 5 + 2w, with weeks w independent; after 6 weeks the seedling is 17 cm tall.

Example 3: Interpret a model

Test-style

The balance on a gift card is y = 40 − 3x dollars after x weeks. Which variable is independent, what does the 3 mean, and after how many weeks is the balance 4 dollars?

  1. The balance depends on the weeks that have passed, so x (weeks) is independent and y (dollars) is dependent.
  2. Each 1-week increase in x lowers y by 3, so the card loses 3 dollars per week.
  3. Set the dependent variable to 4: 40 − 3x = 4, so 3x = 36.
  4. x = 12.

Answer: x (weeks) is independent, 3 dollars is spent each week, and the balance is 4 dollars after 12 weeks.

Common mistakes

✗ MistakeIn P = 2h, where pay P depends on hours h, P is the independent variable.
✓ Insteadh is independent: you choose the hours, and the pay follows.

The independent variable is usually the input, not the result. Ask which quantity depends on the other.

✗ MistakeGraphing hours on the vertical axis and pay on the horizontal axis.
✓ InsteadPut hours (independent) on the horizontal axis and pay (dependent) on the vertical axis.

The convention lets anyone read the graph left to right as “input goes up, see what the output does.” Swapping the axes changes the slope and confuses readers.

✗ Mistake“Independent” means the variable never changes.
✓ InsteadThe independent variable does change; it is the one that changes freely, and the dependent variable responds.

A quantity that never changes is a constant, like the 15 dollars per hour in P = 15h. Both h and P are variables.

Not to be confused with

Independent Variablevs.Dependent Variable

The dependent variable is the output that responds. In d = 60t, time t is independent and distance d is dependent.

Independent Variablevs.Input

An input is one particular value you put in, like t = 2. The independent variable is the quantity that all the inputs are values of, like t itself.

Independent Variablevs.Constant

A constant stays fixed in a problem, like the 60 in d = 60t. The independent variable takes different values.

Quick check: 3 questions

Question 1 of 3

The number of pages a printer prints depends on how many minutes it runs. What is the independent variable?

Show answer and explanation

Answer: B. Pages depend on minutes, so minutes is the independent variable and pages is dependent. The printer is not a quantity, and pages per minute is a rate (a constant in this situation).

Question 2 of 3

In y = 4x + 7, the independent variable equals 3. What is the value of the dependent variable?

Show answer and explanation

Answer: D. The independent variable is x, so y = 4(3) + 7 = 19. −1 sets y = 3 instead, 3 just repeats the input, and 28 adds before multiplying.

Question 3 of 3

A graph shows distance in miles against time in hours. Where should time, the independent variable, go?

Show answer and explanation

Answer: A. By convention the independent variable goes on the horizontal (x) axis and the dependent variable, distance, on the vertical axis. The origin is a point and the slope is a rate, not an axis.

Independent Variable: frequently asked questions

How do you tell the independent variable from the dependent variable?

Fill in the sentence “___ depends on ___.” Whatever fits after “depends on” is independent. “Plant height depends on amount of water” makes water independent and height dependent. If the sentence sounds wrong the other way round (“water depends on plant height”), you have the order right. In equations like y = 2x + 1, x is independent.

Which axis does the independent variable go on?

The horizontal axis, also called the x-axis. The dependent variable goes on the vertical axis. A graph of savings over time puts months across the bottom and dollars up the side. The same rule applies to tables: the independent variable usually goes in the first column or row.

Can there be more than one independent variable?

Yes. In A = lw, the area depends on both length and width, so l and w are both independent and A is dependent. In a careful experiment, scientists usually change only one independent variable at a time, so they can tell which change caused the result.

Practice and tools

Sources

  1. Common Core State Standards, Grade 6 Expressions and Equations (6.EE.C.9)
  2. Common Core State Standards, Grade 8 Functions (8.F.B.4)
  3. OpenStax, Intermediate Algebra 2e, 3.5 Relations and Functions

Updated November 2026·Reviewed by the Effortless Math team·Standards: CCSS 6.EE.C.9, CCSS 8.F.B.4

Cite this entry

Effortless Math Team. “Independent Variable.” Effortless Math Dictionary. Updated November 2026. https://www.effortlessmath.com/math-dictionary/independent-variable/

Flashcard

TermIndependent Variablethe x in y = 3x
DefinitionThe input you choose or change; the dependent variable responds to it. In P = 15h, hours h is independent.
Study the full deck

Browse all terms in the Math Dictionary · More functions terms · Random term