Substituting means dropping a real number into the box and doing the sum. Put x = 4 into 2x + 1 and it comes alive: 2(4) + 1 = 8 + 1 = 9. Let's make that feel easy.
Drop a number inA letter is a labelled box. To substitute is to drop a real number into that box โ and the expression springs to life with an answer.
That's the whole trick, and it really is that simple. Wherever you see the letter, you rub it out and write a number in its place. Then you do the arithmetic, exactly like any other sum. The fancy word "substitute" just means "put this in place of that" โ the same way a substitute on a sports team comes on in place of another player. Here, the number comes on in place of the letter.
Everything else on this page is just practice at doing it carefully โ minding your brackets, your order, your minus signs โ so the answer comes out right every single time.
Before we substitute anything, let's meet the two things you'll be working with. They sound technical, but each is an everyday idea wearing a maths costume.
A variable is a letter that stands for a number โ usually a number you don't know yet, or one that's allowed to change. That's literally why it's called a "variable": its value can vary. The classic letter is x, but it can be any letter at all. Picture it as a small box with a label on the front. The box is empty right now, patiently waiting for someone to drop a number inside.
An expression is a little recipe built from numbers, variables and operations โ things like 2x + 1 or 5 − 2x. An expression has no equals sign and no single answer on its own; it's a set of instructions waiting for ingredients. 2x + 1 is really saying: "take the number in the box, double it, then add one." Until you fill the box, it just sits there, unfinished. Substituting is the moment you finally pour a number in and let the recipe run.
Let's do the headline example slowly, the way you'd write it on the page. Our expression is 2x + 1 and we're told x = 4. Watch what happens to the box.
Step 1 โ find the letter. There's one x, sitting in 2x. That's our box.
Step 2 โ drop the number in. Everywhere you see x, write 4 instead. To stay safe, wrap it in brackets: 2(4) + 1. Those brackets are a tiny reminder that the 2 and the 4 are multiplied.
Step 3 โ do the sum, in order. Multiply first: 2 × 4 = 8, so now you have 8 + 1. Then add: 8 + 1 = 9.
So when x = 4, the expression 2x + 1 is worth 9. Read the chain back and it tells the whole story: 2x + 1 → 2(4) + 1 → 8 + 1 → 9. Notice we didn't skip to the answer โ we showed every step. That habit is what keeps you from slipping up later, and it's exactly what the slider below does for you, live.
Drag the slider to choose x, and watch the working rewrite itself line by line โ the number drops into the box, the expression simplifies, and the answer updates as you move. Tap the buttons to try a different expression.
Slide all the way down past zero and watch the negatives behave. Switch to x² + 1 and notice the box gets squared, not doubled. Every number you see is being worked out the moment you move the slider โ nothing is faked, so you can trust each line.
Substitution itself is easy. Almost every mistake people make happens in the arithmetic afterwards โ and it's nearly always one of two things: a hidden multiply, or doing steps in the wrong order. Let's defuse both.
In algebra, when a number sits right next to a letter, they're being multiplied โ the × is just left out to save ink. So 2x means 2 × x, and 5n means 5 × n. This is exactly why we use brackets when we substitute: writing 2(4) keeps that multiply visible, so you compute 2 × 4 = 8 and not something else. (More on the "something else" trap in a moment.)
Once the numbers are in, you can't just work left to right. Maths has a fixed pecking order, often remembered as BIDMAS: Brackets, Indices (powers, like squaring), Division and Multiplication, then Addition and Subtraction. In 2(4) + 1 the multiplication outranks the addition, so you do 2 × 4 = 8 first, then add 1 to get 9. Do it in the wrong order and you'd get 2 × 5 = 10 โ a different, wrong answer.
Substitute x = 6 into 3x − 4. Box first: 3(6) − 4. Multiply before subtracting: 18 − 4 = 14. If you'd subtracted first you'd have got 3 × 2 = 6 โ wrong. Order matters.
Brackets earn their keep most when the number you're dropping in is awkward โ a value that needs squaring, or a negative number. Here are the two cases worth practising until they feel ordinary.
The expression x² + 1 means "square the box, then add one." The little ² says multiply the number by itself. Substitute x = 3: write (3)² + 1, square it to get 3 × 3 = 9, then add to reach 9 + 1 = 10. By BIDMAS, indices come before addition, so the squaring always happens first.
Now substitute a negative. Take 5 − 2x with x = −2. Box it carefully: 5 − 2(−2). The multiply gives 2 × −2 = −4, so the line becomes 5 − (−4). Subtracting a negative is the same as adding, so 5 − (−4) = 5 + 4 = 9. Without the brackets it's frighteningly easy to lose a sign โ with them, the working stays honest.
Don't take my word for either one โ go back to the slider, pick the matching expression, and drag x to 3 or to −2. The working will spell out the same chain you just read.
A formula is just an expression you've given a name to, and lots of useful ones carry two letters โ two boxes to fill. The area of a rectangle is the classic: A = l × w, where l is the length and w is the width. Substituting works exactly the same way; you just drop a number into each box.
Slide the two values below. The rectangle redraws, and the working plugs your numbers into A = l × w to count up the unit squares inside.
See how the answer is just the two values multiplied? That's the power of a formula: write the rule once with letters, and you can plug in any pair of numbers to get the matching answer. A carpet fitter, a game designer and a gardener all use this exact formula every day.
Substitution isn't only a classroom move โ it's how every real formula turns into a real number. Here are two more, worked out the same careful way. (The numbers are made-up examples, but the method is exactly what you'd use for any real version.)
Perimeter is the distance all the way around. Brackets first by BIDMAS: add the sides, then double.
A ยฃ5 base charge plus ยฃ2 for each gigabyte. Multiply before you add โ the 2n comes first.
Same three moves every time: find the letters, drop the numbers into their boxes, then work it out in BIDMAS order. Once it's a habit, you can read almost any formula and make it tell you a number.
These two slips are so common they're practically a rite of passage. Spot them once, and they'll stop fooling you for good.
"If x = 4, then 2x must be twenty-something โ like 24." Nope. 2x means 2 × x, not the digit 2 stuck in front of the digit 4. With x = 4, 2x = 2 × 4 = 8. The brackets we keep insisting on โ writing 2(4) โ exist precisely to stop this. They shout "multiply!" so you never read it as a two-digit number.
"x² is the same as 2x, right?" They look similar but they're completely different. 2x means 2 × x, while x² means x × x. With x = 3: 2x = 6, but x² = 3 × 3 = 9. So square the number by itself โ don't just double it.
Both traps come down to the same cure: write your brackets, name the operation out loud ("multiply" or "square"), and follow BIDMAS. Slow and clear beats fast and wrong.
Three quick ones. Do the working in your head (or on paper), then tap the answer. The wrong options are the traps we just met.
Spot every letter in the expression โ each one is a labelled box.
Replace the letter with its value, in brackets, so the hidden multiply stays visible.
Follow BIDMAS โ powers and multiplying before adding and subtracting โ and read off the answer.