Variable

Definitionnoun

What is a variable in math?

A variable is a letter or symbol that represents a number or value, usually one that can change or is not yet known. In n + 5 = 12, the variable n is an unknown that equals 7. In A = lw, the variables l and w can take many values. Any letter can be a variable, not just x.

In Spanish
variable
Also called
unknown, symbol, letter (in algebra), placeholder
Grade level
6-8
Grade 6Grade 7Grade 8Algebra 1CCSS 6.EE.A.2CCSS 6.EE.B.6GEDSATACT

Variable in a picture

What a variable isThree panels. In 4x + 7, x is the variable, 4 is its coefficient and 7 is the constant. In n + 5 = 12, the variable n is an unknown that equals 7. In y = 3x, the variables x and y change together: x = 1, 2, 3, 4 gives y = 3, 6, 9, 12.Parts of 4x + 74x+7variablecoefficientconstantA variable as an unknownn + 5 = 12only n = 7 makes it trueVariables that change together: y = 3xx1234y36912when x changes, y changes
A variable can be an unknown (one value that solves an equation) or a quantity that varies (many values, as in a formula or function). The number in front of it is its coefficient.

Formal definition and notation

A variable is a symbol that stands for an element of a specified set, usually the real numbers. It can name one unknown value that an equation determines, any value in a set (as in a formula or an identity such as a + b = b + a), or a quantity that changes together with another quantity in a function, such as x and y in y = 3x.

Symbol Read it as Meaning
x, y, n x, y, n common variable letters, usually printed in italics
3x three x 3 times x: a number written next to a variable means multiplication
x2 x squared x times x
x1, x2 x sub one, x sub two two different values of the same kind of quantity

Key facts

  • A variable does not always have to be x. Any letter or symbol can represent a value: t for time, c for cost.
  • A number next to a variable multiplies it: 5m means 5 × m. That number is the coefficient.
  • A variable with no visible number has coefficient 1: x = 1x.
  • In one problem, the same letter stands for the same value every time it appears.
  • A constant is a value that does not change, like the 7 in 4x + 7.
  • In a function, the input is the independent variable and the output is the dependent variable.

Try it: find the variable

Interactive

The letter n stands for an unknown number. Do the same operation to both sides to find the value of n.

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

Variable examples, step by step

Example 1: Name the parts

Warm-up

In the expression 5m − 9, name the variable, its coefficient and the constant term.

  1. The letter is m, so m is the variable.
  2. The number multiplying m is 5, so the coefficient is 5.
  3. The number with no variable is −9 (the minus sign belongs to it), so the constant term is −9.

Answer: The variable is m; its coefficient is 5 and the constant term is −9.

Example 2: Evaluate an expression with two variables

Core

Find the value of 3a2 − 2b when a = 4 and b = 5.

  1. Substitute, using parentheses: 3(4)2 − 2(5).
  2. Exponent first: 42 = 16, so 3(16) − 2(5).
  3. Multiply: 48 − 10.
  4. Subtract: 38.

Answer: The value is 38.

Example 3: Write and use an expression

Test-style

A gym charges a 25-dollar joining fee plus 18 dollars per month. Write an expression for the total cost after m months, then find the cost for 9 months.

  1. The monthly charge changes with m: 18m dollars.
  2. Add the one-time fee: total cost = 25 + 18m.
  3. Substitute m = 9: 25 + 18(9) = 25 + 162.
  4. Add: 187.

Answer: The expression is 25 + 18m, and 9 months cost 187 dollars.

Common mistakes

✗ MistakeIn 3n + 2, there is no variable because there is no x.
✓ InsteadThe variable is n. Any letter or symbol can represent a value.

A variable does not always have to be x. Writers often pick a letter that reminds them of the quantity, such as t for time.

✗ MistakeIf x = 4, then 3x = 34.
✓ Instead3x = 3 × 4 = 12.

Writing a number next to a variable means multiply. Use parentheses when you substitute: 3(4).

✗ MistakeIn x + x = 10, the two x‘s could be 3 and 7.
✓ InsteadBoth are the same value: 2x = 10, so x = 5.

Inside one problem, a letter stands for the same number every time it appears. Use different letters for different quantities.

✗ MistakeIn x + 6, the coefficient of x is 0.
✓ InsteadThe coefficient is 1, because x = 1 × x.

A coefficient of 1 is not written, but it is there. A coefficient of 0 would make the term disappear.

Not to be confused with

Variablevs.Constant

A constant has a fixed value, like 7 in 4x + 7. A variable can stand for different values.

Variablevs.Coefficient

The coefficient is the number that multiplies a variable. In 4x, 4 is the coefficient and x is the variable.

Variablevs.Expression

An expression is a whole math phrase such as 4x + 7. A variable is one symbol inside it.

Quick check: 3 questions

Question 1 of 3

In 7k − 3, what is the variable?

Show answer and explanation

Answer: B. The variable is the letter, k. The 7 is its coefficient, −3 is the constant, and 7k is a whole term (coefficient times variable).

Question 2 of 3

What is the value of 2x + 3y when x = 5 and y = −1?

Show answer and explanation

Answer: C. 2(5) + 3(−1) = 10 − 3 = 7. Choice A uses y = 1 (drops the negative sign), B reads 2x as 25, and D just adds 5 + (−1).

Question 3 of 3

Which expression means 5 less than twice a number n?

Show answer and explanation

Answer: A. Twice a number is 2n; 5 less than that subtracts 5 from it: 2n − 5. Choice B subtracts in the wrong order, C subtracts before doubling, and D adds.

Variable: frequently asked questions

Why do we use letters in math?

Letters let us write a rule before we know the exact number, and write one rule that works for every number. A = lw gives the area of any rectangle, and n + 5 = 12 lets us name a number we have not found yet. Without variables, each case would need its own sentence.

Is a variable always an unknown?

No. Sometimes it is one unknown number, such as n in n + 5 = 12. Sometimes it can be any number in a set, as in the formula P = 4s or the rule a + b = b + a. In a function such as y = 3x, the variables change together.

What are independent and dependent variables?

In a relationship between two variables, the independent variable is the input you choose and the dependent variable is the output that depends on it. If a taxi charges 2 dollars per mile, c = 2m: the miles m are independent and the cost c is dependent. On a graph, the independent variable usually goes on the x-axis.

Practice and tools

Sources

  1. Common Core State Standards, Grade 6 Expressions and Equations (6.EE.A.2, 6.EE.B.6)
  2. OpenStax, Prealgebra 2e, 2.1 Use the Language of Algebra

Updated November 2026·Reviewed by the Effortless Math team·Standards: CCSS 6.EE.A.2, CCSS 6.EE.B.6

Cite this entry

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

Flashcard

TermVariablex, n, t …
DefinitionA letter that stands for a number that can change or is unknown. In n + 5 = 12, the variable n is 7.
Study the full deck

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