Robot Math Equations: 8 High School Topics Tested in Webots
Moving a robot precisely comes down to rearranging high school equations. Learn 8 math topics using position, speed and time, with real results from Webots.

Summary
- Working out how a robot moves comes down to rearranging the formula "distance = speed × time" to solve for the value you need.
- From positive and negative numbers to quadratic equations, inequalities and rounding, all eight high school math topics in this article are used to calculate position, speed and time.
- Rounding errors build up in proportion to how many times and how long a robot runs. Predict with a formula, run the robot, then check the gap in %. This routine is what matters.
To stop a robot at a target position, you need to calculate how many seconds to run it before it moves. The math for this is not advanced. It is the equation rearranging you learned in high school. This article uses a robot's position, speed and time to walk through the eight topics used in these calculations, one at a time. In the second half, I share results from the robot simulator Webots, which I used to check whether the robot stopped where the formulas said it would.
Robot Math Starts by Rearranging "Distance = Speed × Time"
The formula used most often for robot motion is this one:
Distance d = speed v × time t
Distance is in m (meters), time is in s (seconds), and speed is in m/s (meters traveled per second). The formula has three values, and if you know two of them, you can find the third. To find how many seconds to run the robot, rearrange the formula to solve for t. To find what speed to use, solve for v.
Each of the eight topics below is a tool for using this formula correctly.
Positive and Negative Numbers and Percentages: Direction and Size of an Error
Positive and negative numbers separate "forward" from "backward"
A robot's position is written with "+" for positions ahead of a reference point and "−" for positions behind it. If the robot moves 0.5 m forward and then 0.2 m back, its position is:
0.5 + (−0.2) = 0.3 m
When backward movement is negative, you can combine forward and backward moves with addition alone.
Percentages show how far off the robot was
Percentages show how far the robot got toward a target, or how far it missed. If it covered 3 m of a 4 m section, that is 3 ÷ 4 = 0.75, or 75%.
If it missed a 50 cm target by 1 cm, the error is 1 ÷ 50 × 100 = 2%. Writing the error in % instead of cm means that, even for moves of different distances, you can judge them all with a single rule, such as "within 5% is a pass".
Algebraic Expressions and Factoring: Formulas That Still Work When the Numbers Change
Letters keep the shape of the calculation
If speed is v and time is t, distance is v × t. Writing it with letters means the same formula still works when the numbers change.
For example, say a robot moves at 0.1 m/s for 2 seconds, then for 3 more seconds at the same speed.
- Calculated separately: 0.1 × 2 + 0.1 × 3 = 0.5
- Calculated together: 0.1 × (2 + 3) = 0.5
In letters, this is v × t₁ + v × t₂ = v × (t₁ + t₂). Pulling out a shared letter like this is the basic idea of factoring.
Expanding and factoring go in opposite directions
Expanding (x + 2)(x + 3) gives x² + 5x + 6. Plug in x = 1 to check, and both come out to 12:
- (1 + 2) × (1 + 3) = 12
- 1² + 5 × 1 + 6 = 12
Going the other way, turning x² + 5x + 6 back into (x + 2)(x + 3), is factoring. You will use it later to solve quadratic equations.
Square Roots and Powers: Diagonal Distance and Unit Conversion
Square roots give the diagonal distance
If a robot moves 0.3 m forward and 0.4 m sideways, the straight-line distance from the starting point comes from the Pythagorean theorem:
√(0.3² + 0.4²) = 0.5 m
If the forward/backward movement is dx and the left/right movement is dy, the distance is √(dx² + dy²). The Webots test later in this article also measures the robot's travel distance with this formula.
Powers of 10 keep units consistent
Robot simulators and controllers often handle time in milliseconds (ms). One second is 1,000 milliseconds (10³ ms), so 32 ms in seconds is:
32 ÷ 1000 = 0.032 s
If you calculate without matching the units, the answer will be off by a factor of 1,000. Convert everything to m and s before you put numbers into a formula.
Powers of 2 and the limits of computer precision
Computers store numbers as strings of 0s and 1s (bits). Multiply 2 by itself 10 times and you get 2¹⁰ = 1,024. When the number of bits is limited, there is also a limit to how finely numbers can be represented. That limit is what leads to the rounding errors explained later.
Equations: Working Back to Time and Speed
A linear equation tells you how many seconds to run
Say the robot needs to reach a point 0.5 m ahead at 0.1 m/s. The value you want is the time t.
0.1 × t = 0.5 t = 0.5 ÷ 0.1 = 5 seconds
An equation with one unknown value, raised only to the first power, is a linear equation. Most robot travel-time calculations take this form.
Simultaneous equations recover speed and starting position from a log
Say a robot's log shows "0.3 m at 2 seconds, and 0.5 m at 4 seconds." If the starting position is x₀ and the speed is v, you get two equations:
- x₀ + v × 2 = 0.3
- x₀ + v × 4 = 0.5
Subtract the first equation from the second, and x₀ disappears.
- Speed: v = (0.5 − 0.3) ÷ (4 − 2) = 0.1 m/s
- Starting position: x₀ = 0.3 − 0.1 × 2 = 0.1 m
Even with two unknown values, two equations are enough to find them. You can use this to work out the robot's actual speed from its log and confirm it is moving as set.
A quadratic equation handles motion that speeds up at a steady rate
When a robot starts from a stop and speeds up (accelerates) at a steady rate, the distance it covers is given by the formula below. Here a is the acceleration, which tells you how much the speed increases each second. Its unit is m/s².
Distance d = ½ × a × t²
To find the time needed to travel 1 m at an acceleration of 0.5 m/s²:
½ × 0.5 × t² = 1 t² = 4 t = √4 = 2 seconds
Two numbers satisfy t² = 4: 2 and −2. Time cannot be negative, so −2 is not used. Quadratic equations often give two answers, and you have to judge which answer fits the situation.
Let's also look at a quadratic solved by factoring. x² − 5x + 6 = 0 factors into (x − 2)(x − 3) = 0, so the answers are x = 2 and x = 3. Plugging them back in, 2² − 5 × 2 + 6 = 0 and 3² − 5 × 3 + 6 = 0, so both work.
Inequalities: Turning "No More Than" and "Within" Into Formulas
Robot tasks come with conditions such as "finish within this time" or "stop within this margin." Inequalities are how you write these conditions.
Say the target position is 0.2 m and you want the error to stay within ±5%.
- Allowed error: 0.2 × 0.05 = 0.01 m
- Lower limit: 0.2 − 0.01 = 0.19 m
- Upper limit: 0.2 + 0.01 = 0.21 m
If the stopping position is x, the pass condition is 0.19 ≤ x ≤ 0.21. Writing the condition as an inequality lets you decide pass or fail mechanically.
Upper limits that must not be exceeded, such as a motor's maximum rotation speed, are also checked with inequalities.
Change any result. Bars inside the green band pass.
- Run 1: 98 cm(difference -2 cm)→ Pass
- Run 2: 101 cm(difference +1 cm)→ Pass
- Run 3: 97 cm(difference -3 cm)→ Pass
- Run 4: 103 cm(difference +3 cm)→ Pass
- Run 5: 100 cm(difference +0 cm)→ Pass
5 of 5 runs passed. Average of the runs: 99.8 cm
Rearranging Formulas: Put the Value You Want on the Left
Before you use any of the formulas so far, rearrange it so the value you want is on the left side.
- To find time: d = v × t → t = d ÷ v
- To find speed: d = v × t → v = d ÷ t
- To find time while accelerating: d = ½ × a × t² → t² = 2d ÷ a → t = √(2d ÷ a)
For a robot that moves on wheels, the travel speed comes from the wheel's rotation speed ω (in rad/s, or radians per second) and the wheel radius r:
v = r × ω
The slope of this line is the speed.
The slope of this line is the acceleration.
After rearranging, check that the units work out. For t = d ÷ v, m ÷ (m/s) = s, so the answer comes out in seconds and the form is correct. The meaning of m, s, rad/s and other units is explained in robot units such as radians and torque.
Significant Figures, Estimates and Rounding: Watch Small Errors Add Up
An estimate tells you roughly what the answer should be
0.098 × 3.1 is exactly 0.3038. If you first estimate 0.1 × 3 = 0.3, you know the answer should be around 0.3. If your result is far from that estimate, suspect the formula or the numbers you entered.
Control "time steps" cause rounding
Robot controllers and simulators move things forward in fixed time steps. For Webots, the official documentation says the time to advance in one step is given in milliseconds and must be a multiple of the basic time step (basicTimeStep). The default basicTimeStep is 32 milliseconds.
So when a calculated time does not divide evenly by the step, you have to round the number of steps to a whole number. For example, 3.000 seconds divided into 0.032-second steps is 93.75 steps. Rounding up to 94 steps makes the actual run time 94 × 0.032 = 3.008 seconds, which is 0.008 seconds longer than planned.
Small rounding errors grow when repeated
Each rounding error may be small, but errors build up in proportion to how many times and how long a machine runs. A well-known example is the Patriot missile failure described in a 1992 report by the U.S. General Accounting Office (GAO).
According to the report, on February 25, 1991, a Patriot missile defense system operating in Dhahran, Saudi Arabia, failed to track and intercept an incoming Scud missile. The Scud hit U.S. military barracks, and 28 Americans were killed. At the time, the system had been running continuously for more than 100 hours.
The cause was a time calculation. The system's internal clock counted time as a whole number of tenths of a second, but converting that count to a real number was limited to 24 bits of precision, so the time calculation slowly became inaccurate. The report explains that the effect of this inaccuracy is directly proportional to the target's speed and to how long the system has been running.
Here is a summary of the table in the report:
| Continuous run time | Time error (seconds) | Shift in tracking range (approx. m) |
|---|---|---|
| 1 hour | 0.0034 | 7 |
| 8 hours | 0.0275 | 55 |
| 20 hours | 0.0687 | 137 |
| 100 hours | 0.3433 | 687 |
A note in the report states that after about 20 hours of continuous running, the target falls outside the tracking range. On February 11, 1991, data from Israel arrived showing a 20% shift in the tracking range after 8 hours of continuous running. But the corrected software did not reach Dhahran until February 26, the day after the incident.
An error of 0.0034 seconds after 1 hour grew to 0.3433 seconds after 100 hours, and the tracking range shifted by about 687 m. Even a small error can lead to a serious accident when a machine keeps running long enough. Machines that run for long periods should be designed on the assumption that errors grow over time, with a way to reset their time and position.
Check how your calculation tool rounds
Different tools round in different ways. Python's round() rounds values that are exactly halfway toward the even number. The official documentation explains that round(0.5) and round(−0.5) both give 0, and round(1.5) gives 2.
Also, round(2.675, 2) gives 2.67, not the 2.68 you might expect. The official documentation says this is not a bug. It happens because many decimal fractions cannot be represented exactly on a computer. If you use round() assuming the usual "round half up," the results may not be what you want.
Predict With Formulas, Then Run: Results Checked in Webots
Leave the calculations to programs
I do not do calculations like these by hand, and I do not leave them to AI text generation. My rules are:
- Store data in a database together with its source
- Do calculations in Python
- Let AI write only the text, and use Python to insert the numbers into that text
When I built a tool that uses prediction market data (prices from markets where people trade on the outcomes of future events) to support stock decisions, I used the same split. AI matched the text of each prediction market question to related stocks, and a program calculated the probabilities. Separating the work of reading language from calculations that must give the same answer every time prevents mistakes in the numbers.
When I run robots, I also follow these steps:
- Before running, predict the result with a formula
- Run the robot
- Calculate the gap between the prediction and the result in %, and count it as a pass if it is within 5%
When the prediction comes first, you can tell where a gap came from: the formula, rounding, or the robot itself. Robot Experiment Basics covers how to decide the prediction, the conditions, what to record and the success criteria before you run the robot.
Test conditions in Webots
I checked this routine in the robot simulator Webots (R2025a). The robot was the e-puck, a small robot that moves on wheels.
- Wheel radius: 0.02 m
- Time step (basicTimeStep): 32 milliseconds
- Motion A: wheel speed of 5.0 rad/s, moving forward a target distance of 0.30 m
- Motion B: then speeding up the wheels backward at 1.0 rad/s² (wheel speed increases by 1.0 rad/s each second) and backing up 0.16 m
- Success criterion: a gap from the prediction within 5%
Motion A: predicting the time with a linear equation and a rearranged formula
- Travel speed: v = r × ω = 0.02 × 5.0 = 0.100 m/s
- Time needed: t = d ÷ v = 0.3 ÷ 0.100 = 3.000 seconds
- Number of time steps: 3.000 ÷ 0.032 = 93.75 → rounded to 94
- Actual run time: 94 × 0.032 = 3.008 seconds
The robot moved 0.3008 m forward and 0.0000 m sideways, so the distance measured with √(dx² + dy²) was 0.3008 m. This matched the predicted travel (0.100 m/s × 3.008 seconds = 0.3008 m). Against the 0.30 m target, the gap was +0.27%, which is a pass. This gap comes from the extra 0.008 seconds of running caused by rounding.
Result for a target distance of 0.30 m. Because 93.75 steps were rounded to 94, the robot ran for 3.008 seconds.
Motion B: checking the time and limits with a quadratic equation and an inequality
- Acceleration: a = 0.02 × 1.0 = 0.020 m/s²
- Time needed: t = √(2 × 0.16 ÷ 0.020) = 4.000 seconds (the other answer, −4.000 seconds, is not used)
- Number of time steps: 125
- Final wheel speed: 4.000 rad/s. This is below the motor's limit of 6.28 rad/s, so there is no problem.
The robot moved 0.1600 m backward (a position change of −0.1600 m). The gap was +0.00%, which is a pass. The final position was +0.3008 + (−0.1600) = +0.1408 m. Positive and negative numbers let you add the forward and backward moves together.
Changing the condition: a target distance of 0.40 m
If only the target distance changes to 0.40 m, then t = 0.4 ÷ 0.100 = 4.000 seconds, and the number of steps is 125.00. The time divides evenly into steps, so no rounding happens.
| Target distance | Number of steps | Actual run time | Motion A travel | Gap | Final position |
|---|---|---|---|---|---|
| 0.30 m | 93.75 → 94 | 3.008 s | 0.3008 m | +0.27% | +0.1408 m |
| 0.40 m | 125 (no rounding) | 4.000 s | 0.4000 m | 0.00% | +0.2400 m |
Result for a target distance of 0.40 m. The time divides evenly into 125 steps, so no rounding occurred.
Putting the two results side by side shows that the only cause of the gap was rounding to the time step. Because I had predicted the result with formulas first, I could explain right away where the 0.27% gap came from.
Calculation Examples for Japanese Companies in the Philippines
The following are hypothetical examples of how Japanese companies in the Philippines might use robots. The numbers are only for illustration.
Restaurant serving robot: a linear equation
If the table is 6 m from the kitchen and the robot moves at 0.5 m/s, delivery takes t = d ÷ v = 6 ÷ 0.5 = 12 seconds. You can use this to estimate how long it takes to serve a dish.
Warehouse transport robot: rounding that adds up
Say each run goes 0.008 seconds longer than planned because of time-step rounding. At 0.1 m/s, each run is off by 0.008 × 0.1 = 0.0008 m. After 1,000 runs without resetting the position, the robot is off by 0.008 × 0.1 × 1000 = 0.8 m. This shows you need a way to reset the robot's position in front of the shelves.
Delivery cart: a quadratic equation
To find the time needed to travel 4 m at an acceleration of 0.5 m/s², solve t² = 2 × 4 ÷ 0.5 = 16, so t = 4 seconds. −4 seconds is not used as a time.
Factory inspection conveyor: an inequality
To inspect parts moving at 0.2 m/s within 10 seconds, calculate 0.2 × 10 = 2, so the inspection section should be 2 m or shorter.
FAQ
Q: Do business owners and managers need to learn math when bringing in robots?
A: Engineers and programs do the calculations themselves. But if you understand how to rearrange "distance = speed × time" and how to judge errors in %, it becomes easier to check a vendor's explanation and the assumptions behind their quote.
Q: What should I do when a calculated time does not divide evenly?
A: Round the number of steps to a whole number that matches the control time step. Then include the gap caused by rounding in your prediction, and compare it with the actual result in %. If the robot runs repeatedly, reset its position before the gaps build up.
Q: When a quadratic equation gives two answers, which one should I use?
A: Choose the one that fits the situation. When you are finding a robot's travel time, negative time cannot happen, so the negative answer is not used.
Q: Can I leave robot calculations to AI?
A: I do the calculations with Python or other programs, and leave text and language matching to AI. When a program does the calculation, the same input always gives the same result, so mistakes in the numbers are easier to find.
Conclusion
Calculating how to make a robot move the way you want centers on rearranging "distance = speed × time" for the value you need. Positive and negative numbers and percentages describe direction and error, equations give you time and speed, and inequalities set the pass conditions. Rounding errors build up in proportion to how many times and how long the robot runs, so predicting with a formula, running the robot and checking the gap in % is a routine you cannot skip.
PH AI Works is based in Manila, Philippines, and helps small and mid-sized businesses with AI adoption, business automation and web development. If you want to talk about how to approach robot or automation calculations, or how to check the assumptions behind a vendor's quote, feel free to book a free consultation.
References
About the author

Founder / AI Engineer (36+ years in IT)
- ●From Tokyo · based in Manila for 13+ years
- ●36+ years in IT (development, SEO, AI)
- ●Google Certified AI Professional
- ●IBM Certified Generative AI Engineer
- ●AI chatbots, RAG & AI agent development
- ●Physical AI Engineer
A Japanese AI engineer with 36+ years in IT and 13+ years on the ground in the Philippines. I write from hands-on experience to help Japanese companies adopt AI that actually delivers results — chatbots, workflow automation, AI agents, and AI-driven marketing. Feel free to reach out in Japanese or English.
Your Competitors Are Already Using AI!
Is your business keeping up?
Related Articles

Robot Units Explained: Radians, Torque and Power
Learn the units in robot spec sheets: m/s, radians, rad/s, torque in N·m and power in W, with worked examples and a robot simulator test.
11/16/2026

Robot Experiment Basics: 5 Things to Decide Before You Start
Before a robot experiment, decide five things: your prediction, the one thing you will change, what to record, success criteria and how many times to run it.
11/16/2026

Research, Analysis, and Writing in One Workflow
Research, analysis, and writing are three separate jobs whose handoffs now cost more than the work itself. How to run them as a single workflow in four steps, and what to measure.
8/18/2026
AI Model Vendors Now Sell Implementation Too
OpenAI and Anthropic now sell implementation support as well as AI models. What a Japanese-affiliated local subsidiary in the Philippines should decide in-house first, before choosing an AI partner.
8/18/2026
Contracting for AI While Prices Keep Falling
Write a model number into a contract and it is obsolete in six months. Learn how to design AI contracts for switching instead, with capability-based specifications, price-revision terms, and migration clauses.
8/17/2026

Building an In-House AI Team With Multi-Agent Systems
A multi-agent system is a team, and the hard part is organisational. How to define what each agent must not do, connect two agents first, and measure whether the setup actually works.
8/17/2026
