Maths Manipulatives / Function Machine
A number goes in the IN box, moves through one or two steps inside the machine, and comes out in the OUT box. Every pair fills an In and Out table underneath.
Opens on the whiteboard. Free, no sign-in.
What it looks like on the board
A function machine is a box with a rule inside: a number goes in, the rule changes it, and a new number comes out the other side. On this one, the IN box sits on the left, the teal machine with its step cards in the middle, and the OUT box on the right. Under it is the In and Out table, which American schools call an input output table, and the row along the top holds the three ways to run it: In → Out, Out → In and Guess the rule.
Guess the rule turns the machine into a game: it hides a secret rule, and the class sends numbers through until someone can say what it does. The rules are sized for primary, things like add 7, times 4, or times 3 then take away 2. Every step is covered by a black question mark card, and while anything is covered no in-between number is shown, so only the In and Out give the rule away.
Send three or four numbers through and ask the class what the machine is doing. Ask them to predict the next Out before you send it. When they think they have it, press Show under one step, or Reveal rule for all of it. New rule picks another.
Out → In turns the machine round: you type the number that came out, and it runs back through the inverse steps to find what went in. With times 3 then add 2, it takes away 2 first, then divides by 3, so the class sees why the last step is undone first.
This is the missing number problem made visible. Numbers stay whole, so if nothing whole can go in to give that number, the machine says so.
The order of the steps doesn't matter. Swap times 3 then add 2 for add 2 then times 3 and send the same number through. The table makes the difference plain.
Running backwards means doing the same steps. Out → In divides where the rule says multiply, and undoes the last step first.
A rule only works for the numbers you tried. Guess the rule asks pupils to test their idea on a new number before it is revealed.
Is there a free function machine for the interactive whiteboard?
Yes. It's free, with no sign-in. Type a number or press Random number, press Send it through, and watch it go through one or two steps into the OUT box.
Can I hide the rule so the class has to guess it?
Yes. Press Guess the rule. The machine picks a random rule and hides it behind question marks. Send numbers through, let the class work it out from the table, then press Reveal rule.
Can it run backwards?
Yes. Press Out → In and type the number that came out. Send it through, and it runs the other way through the inverse steps until it reaches the number that went in.
What happens if a number will not divide exactly?
The machine keeps to whole numbers. If a number would leave a remainder, it says so and asks for another one. Random number only ever picks numbers that go through cleanly.
Can I set my own rule?
Yes. Pick 1 step or 2 steps, then press Change under a step to choose add, take away, multiply or divide, and its number.
Is an input output table the same as a function machine?
They show the same rule two ways. The machine shows one number going through the steps, and the input output table keeps every pair so the class can spot the pattern. Here the table fills itself as each number comes out.
Is there a function machine game for KS2?
Guess the rule is the game. The machine hides a random rule, the class picks numbers to send through, and the first to explain the rule wins before you press Reveal rule. Two step rules make it harder for Year 5 and 6.
What is a two step function machine?
A machine with two rules in a row, such as times 3 then add 2. The number does the first step, then the second. Pick 2 steps in the row to set one up, and the number changes as it passes each step card.
Open it, press Guess the rule, and let the class pick the first number to send through.
See all 21 maths manipulatives →
Written by a practising primary school teacher, part of the free Maths Manipulatives set on Sage Teachers. Last checked November 2026. Free to use, no sign-in.