Euler's Method Calculator

Final y value—
Final x value—
Steps taken—

Step-by-step Euler table

How Euler's Method Calculator is calculated: yₙ₊₁ = yₙ + h·f(xₙ, yₙ), starting from y(x₀) = y₀

What is a Euler's Method Calculator?

The Euler's Method Calculator is a free online tool that solves a first-order differential equation numerically by Euler's method, stepping forward from a starting value and showing every step in a table. Differential-equations students meeting numerical ODE methods for the first time use it when an approximate solution to y′ = f(x, y) when the equation cannot be solved exactly, or to check an exact solution. Instead of repeating the step y ← y + h·f(x, y) over and over by hand, where one arithmetic slip carries into every later step, you type the differential equation from the list, the starting point (x₀, y₀), the step size h, and how many steps to take and the calculator returns the final y value, the final x value, the number of steps, and a full step-by-step table straight away.

The working idea is simple. the calculator starts at (x₀, y₀) and repeats the Euler step: the new y is the old y plus the step size times the slope at the old point Each step follows the tangent line at the current point for a distance h, then re-evaluates the slope at the new point and repeats. The table shows every step, so you can follow the solution as it is built and spot where it starts to drift. There is no sign-up and nothing to install: the page runs entirely in your browser, so your numbers never leave your device.

That matters because most differential equations have no closed-form solution, and Euler's method is the simplest way to get numbers out of them — it is the first numerical method every student meets Euler's method is a first-order approximation, so the error is roughly proportional to the step size: halving h roughly halves the error, but it also doubles the number of steps. The rest of this page walks through the formula, the input people get wrong most often, and a worked example with real numbers you can check by hand.

How a Euler's Method Calculator works

At its core, the calculator applies each new value is the old value plus the step size times the slope at the old point. yₙ₊₁ = yₙ + h·f(xₙ, yₙ), with xₙ₊₁ = xₙ + h, starting from y(x₀) = y₀. The slope f(xₙ, yₙ) is the derivative at the current point, so each step walks along the tangent line for a distance h. The formula box at the top of this page shows the same rule in symbols: yₙ₊₁ = yₙ + h·f(xₙ, yₙ), starting from y(x₀) = y₀.

The calculator evaluates the preset right-hand side at each step — x + y, −0.5y, y or x − y — updates y, advances x by h, and records the row in the table. The final row is the approximate solution at the final x. The step size must be positive and the number of steps between 1 and 20. A step that is too large can overshoot badly, especially for equations whose solutions curve sharply.

Euler's method is first-order, so the error is roughly proportional to h — halving the step roughly halves the error A derivative calculator can help you check the numbers that feed into this step, and it is worth doing that check before you trust an answer that looks surprising.

The the step size h explained

The step size decides the accuracy, and the mistake people make is taking steps that are far too big. With h = 0.2 the equation y′ = x + y from (0, 1) reaches y ≈ 2.98 at x = 1, while the exact solution is about 3.44 — an error of 0.46, which is far too big to ignore. With h = 0.05 the answer is much closer. The step size is not a detail; it is the accuracy.

Start with h = 0.2 and look at the answer, then halve h to 0.1 and compare. If the answer changes a lot, halve it again. When halving stops changing the answer much, you have enough steps — but remember that halving h doubles the work. Keep h small enough that the solution does not change much in one step. If y jumps by more than about 10% in a single step, the step is too big for the tangent-line approximation to hold.

For y′ = y from (0, 1) the exact solution is eˣ, so at x = 0.5 the true value is about 1.65. Euler's method with h = 0.1 gives 1.61 — close, but visibly below the truth, because the tangent always undershoots a convex curve. A slope calculator is a good cross-check when the input comes from a measurement or a table rather than from a textbook problem.

A worked example

Take the default settings on this page: y′ = x + y, starting from y(0) = 1, with step size h = 0.2 and 5 steps, reaching x = 1.

The steps run: y = 1.2 at x = 0.2, then 1.48 at x = 0.4, 1.856 at x = 0.6, 2.3472 at x = 0.8, and finally 2.9766 at x = 1. The table on the page shows every step.

The final value 2.98 is the Euler approximation to the true solution, which is about 3.44 at x = 1. The gap of 0.46 is the price of a step size of 0.2 — the method follows the tangent, and the true curve bends away from the tangent at every step. Halve the step to h = 0.1 with 10 steps and the answer moves to about 3.18, closer to the truth. That is the first-order behaviour: halving h roughly halves the error.

Where the Euler's Method Calculator is used

In physics, Euler's method simulates motion step by step: from the current position and velocity, the next position follows, which is how simple computer simulations of falling bodies and orbits work.

In biology, it steps a population model forward in time — births minus deaths each step — to predict how a population grows when the equation cannot be solved exactly. A linear equation calculator often sits next to it in the same workflow, because the two answers answer different halves of the same question.

In engineering, it is the first method tried on any new differential equation, because it is simple enough to code in a few lines and good enough to show whether the model behaves sensibly.

It also helps to keep the units consistent from the first number to the last. Mixing units — metres with centimetres, degrees with radians, seconds with minutes — is the quietest way to get an answer that looks plausible and is wrong by a large factor. Write the unit next to every number you enter, and check the result's unit against the unit you expect before you use the answer anywhere else.

Euler's Method Calculator vs Derivative Calculator

A derivative calculator gives you the slope of a function at a point. Euler's method uses slopes to build a whole solution: at each step it takes the slope at the current point and walks along it for a distance h. The derivative is the engine here, not the answer.

Use the derivative calculator when you need a single slope. Use Euler's method when you need the solution of a differential equation — a function, not a number — built up step by step from a starting value. The scientific calculator covers the other side of the same problem, so the two tools complement each other rather than compete.

The two agree where they overlap: the slope used in each Euler step is exactly the derivative of the solution at that point, which is what the derivative calculator would give if you knew the solution.

Common mistakes with the Euler's Method Calculator

The first mistake is using a step size that is too large. Euler's method follows the tangent line, and the tangent is only a good guide for a short distance — with h = 1 the answer can be wrong by more than the value itself, and no amount of staring at the table will fix it.

The second mistake is evaluating the slope at the new point instead of the old one. The Euler step uses f(xₙ, yₙ), the slope where you are, not where you are going. Using the new point is a different method — the implicit Euler method — and mixing the two gives a wrong table.

The third mistake is forgetting that the error accumulates. Each step adds a small error, and the errors do not cancel — they pile up, so the last step is the least accurate, not the most. Quote the final value with that in mind.

How to use this Euler's Method Calculator

Open the page and enter the differential equation from the list, the starting point (x₀, y₀), the step size h, and how many steps to take. Pick the equation, enter the starting point and the step size, and choose the number of steps. Read the table row by row to follow the solution.

Read the final y as the approximate solution at the final x, and read the table to see how the solution grew — a jump in one row usually means the step was too big there. Compare the answer at two step sizes: if halving h changes the final value a lot, the first answer was not accurate enough.

Everything runs in your browser. No account, no upload, no data sent anywhere — your numbers never leave your device. If a result looks wrong, re-check the inputs first: a single mistyped number is the usual cause, and a derivative calculator will confirm the arithmetic.

Frequently Asked Questions

The final value is 2.9766 at x = 1, after 5 steps. The exact solution is about 3.44, so the Euler answer is low by about 0.46 — the price of a step size of 0.2.

each new value is the old value plus the step size times the slope at the old point yₙ₊₁ = yₙ + h·f(xₙ, yₙ), with xₙ₊₁ = xₙ + h, starting from y(x₀) = y₀. The slope f(xₙ, yₙ) is the derivative at the current point, so each step walks along the tangent line for a distance h.

Because each step follows the tangent line, which is straight, while the true solution curves away from it. The error in one step is roughly proportional to h², and over many steps it adds up to an error roughly proportional to h. Halving h halves the error, but better methods such as Runge-Kutta get far more accuracy for the same work.

Start with a step that changes y by only a few percent per step, then halve it and compare the answers. When halving stops changing the final value much, the step is small enough. For most textbook problems h = 0.1 or 0.05 is a good starting point, and h = 0.2 is already visibly rough.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.