If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Evaluating expressions with one variable

A mixture of explanations, examples, and practice problems to have you evaluating expressions with one variable in no time!

How to evaluate an expression with one variable

Let's say we want to evaluate the expression a, plus, 4. Well, first we need to know the value of the variable a. For example, to evaluate the expression when start color #11accd, a, equals, 1, end color #11accd, we just replace start color #11accd, a, end color #11accd with start color #11accd, 1, end color #11accd:
a+4=1+4        Replace a with 1.=5\begin{aligned} &\blueD a + 4 \\\\ =&\blueD1 + 4~~~~~~~~\gray{\text{Replace }\blueD{a} \text{ with } \blueD{1}\text{.}} \\\\ =&5 \end{aligned}
So, the expression a, plus, 4 equals 5 when a, equals, 1.
We can just as easily evaluate a, plus, 4 when start color #11accd, a, equals, 5, end color #11accd:
a+4=5+4        Replace a with 5.=9\begin{aligned} &\blueD a + 4 \\\\ =&\blueD5 + 4~~~~~~~~\gray{\text{Replace }\blueD{a} \text{ with } \blueD{5}\text{.}} \\\\ =&9 \end{aligned}
So, the expression a, plus, 4 equals 9 when a, equals, 5.

Evaluating an expression with multiplication

You might be asked to "Evaluate 3, x when x, equals, 5."
Notice how the number 3 is right next to the variable x in the expression 3, x. This means "3 times x". The reason we do this is because the old way of showing multiplication with the symbol times looks confusingly similar to the variable x.
Okay, so now let's solve the problem:
3x=35        Replace x with 5.=15\begin{aligned} &3\blueD x \\\\ =& 3 \cdot \blueD5~~~~~~~~\text{Replace }\blueD{x} \text{ with } \blueD{5}\text{.} \\\\ =&15 \end{aligned}
So, the expression 3, x equals 15 when x, equals, 5.

New ways to show multiplication

Hold on a second! Did you notice that we wrote "3 times start color #11accd, 5, end color #11accd" as 3, dot, start color #11accd, 5, end color #11accd instead of as 3, times, start color #11accd, 5, end color #11accd? Using a dot instead of the symbol times is another new way of showing multiplication:
3, dot, start color #11accd, 5, end color #11accd, equals, 15
Parentheses can also be used to show multiplication:
3, left parenthesis, start color #11accd, 5, end color #11accd, right parenthesis, equals, 15
Let's summarize the new ways of showing multiplication that we learned.
Old wayNew way
With a variable3, times, x3, x
Without variable3, times, 53, dot, 5 or 3, left parenthesis, 5, right parenthesis

Evaluating expressions where order of operations matter

For more complex expressions, we'll have to be sure to pay close attention to order of operations. Let's take a look at an example:
Evaluate 5, plus, 3, e when start color #11accd, e, equals, 4, end color #11accd.
5+3e=5+34        Replace e with 4.=5+12        Multiply first (order of operations)=17\begin{aligned} &5+3\blueD e \\\\ =&5 + 3 \cdot \blueD 4~~~~~~~~\gray{\text{Replace }\blueD{e} \text{ with } \blueD{4}\text{.}} \\\\ =&5 + 12 ~~~~~~~~\text{\gray{Multiply first (order of operations)}} \\\\ =&17 \end{aligned}
So, the expression 5, plus, 3, e equals 17 when e, equals, 4.
Notice how we had to be careful to think about order of operations when evaluating. A common wrong answer is start color #e84d39, 32, end color #e84d39, which comes from first adding 5 and 3 to get 8 then multiplying 8 by 4 to get start color #e84d39, 32, end color #e84d39.

Let's practice!

Problem 1
Evaluate the expression 9, minus, z when z, equals, 4.
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text

Challenge problems

Challenge problem 1
Evaluate e, dot, e, minus, 5, e when e, equals, 5.
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text

Want to join the conversation?

  • aqualine seed style avatar for user Joy
    I still don't understand the challenge problems e⋅e−5ee, dot, e, minus, 5, e when e=5e=5e, equals, 5.What does this mean?
    (38 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Littleman0562
      so, e(dot)e - 5e, the dot symbol represents multiplication. And 5e is another way to represent multiplication so, the expression actually looks like this: 5x5 - 5x5 which equals to 0 because 5x5 = 25, and 5x5 = 25, and subtracting 25 with 25 = 0.

      e(dot)e - 5e
      5x5 - 5x5 = 25 - 25
      25 - 25 = 0
      (63 votes)
  • starky sapling style avatar for user Morgan, Aaron
    If 9-8/x = ? and x=4 what do I do with the 8/x? Do I multiply add divide or subtract?
    (25 votes)
    Default Khan Academy avatar avatar for user
  • starky sapling style avatar for user kme
    If you don't know what y is, then you won't get an exact answer
    (9 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Intellectual Genius
      Well you don't need to know what y is to solve the question. For example you have:6t=48. (if something is written like 6t, that always means you have to multiply, or any variable). So we have: 6t=48, we can divide both sides by 6 (we are dividing because you always do the inverse of what you are trying to solve, the opposite of multiplication is division)

      we have to divide both sides by 6

      6t=48, 6/6 cancels out, 48/6=8. So now the equation would look like this: t=8, and now we know what t is we can verify it. 6t=48 or 6x8=48.

      And that's the beauty of Algebra!

      If you need more help just tell me.
      -Intellectual Genius
      (19 votes)
  • male robot donald style avatar for user Smith  Dalton
    Why do we have to do multiplication and division first? Why to use these "order of operation"?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user moralisaiah
      Here is why; "Because exponents are simply repeated multiplication, they are performed before multiplication. ... Thus the order: parentheses first, exponents second, mutiplication and division third, and save the lowest level operations of addition and subtraction for last." Personally I believe order of operation is way to balance the equation as well. :)
      (19 votes)
  • blobby green style avatar for user jayden farrow
    so u saying if i put 5 + 2b and be equal to 5 the answer would be 15
    (8 votes)
    Default Khan Academy avatar avatar for user
  • male robot johnny style avatar for user jonathan.christen
    what is it asking me when it says Evaluate 2y2y when y = 6y=6
    (8 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      It means you use substitution... You replace the "y" in "2y" with the value you are given. Since you were told to use "y=6", you take out "y" and replace it with 6. Remember, "2y" means "2 times y", so you need a multiplication symbol. Thus, "2y" becomes "2(6)".
      Then, you simplify the expression by doing the multiplication. Your final answer would be 12.

      Hope this helps.
      (1 vote)
  • leafers tree style avatar for user Corbin Beyler
    this is so easy im in Geometry
    (4 votes)
    Default Khan Academy avatar avatar for user
  • hopper cool style avatar for user Zoob
    what does 2(3) mean?
    (4th question in practice)
    (5 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user ajlaanzayan
    i can't understand the question nine please help me understand
    (5 votes)
    Default Khan Academy avatar avatar for user
    • sneak peak blue style avatar for user pompano [hurt lol]
      Start out with the variable. What is d worth? What do you need to do with that variable in the sentence? You should see that d is worth 4, and we need to now add that in the sentence.

      The sentence should now look like this -
      8/4 + 3

      Now, solve it like you would usually do it. 8/4 is equal to 2 (We need to do it first since it is the second in the Order of Operations), and then add 3 to that 2. You should get an answer of 5 if you did all that calculation correctly.

      Hope this helped!
      (4 votes)
  • blobby green style avatar for user Sanchez,Giovanni;201140442
    im still having trouble with this math
    (3 votes)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user David Severin
      We are trying to evaluate an expression for a given value. So lets say that you can buy a bottle of coke for 1.50. If you buy 1 bottle, you pay 1.50, two bottles cost 3 dollars, 3 bottles is 4.50, 4 bottles cost 6 dollars, and so on. The store does not care how many bottles you buy, but they may only have 100 bottles, so you could not buy more than what they have. So we could create an expression of 1.50x for this situation. Then for any number up to 100 bottles we could calculate the cost by substituting the number of bottles in for x. Lets say you want to buy 4 bottles (which means x=4), you would have 1.50 (4) =6 dollars which is what we would expect. What if you want 22 bottles? Do you want to keep adding 1.50 a bunch of times, or use the expression 1.50(22) to find the answer?
      One thing I recommend to my students is to just put the substituted number in () whenever you see the variable. If you have x^2 + 3x - 4, we can evaluate it for any value, so I will make up 3 values, -4, 0, and 4. Every time I see an x, lets put the number in parentheses. For -4, we get (-4)^2+3(-4)-4. For 0 we get (0)^2+3(0)-4, and for 4 we get (4)^2+3(4)-4. By putting in parentheses, it should take care of any sign issues.
      (2 votes)