Euler's Method Calculator
Solve an initial value problem dy/dx = f(x, y) step by step, with an improved Euler comparison column, a full table and a plotted solution curve.
Step-by-step table
| n | xₙ | yₙ (Euler) | f(xₙ, yₙ) | yₙ (Heun) |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 |
| 1 | 0.1 | 1.1 | 1.1 | 1.105 |
| 2 | 0.2 | 1.21 | 1.21 | 1.221025 |
| 3 | 0.3 | 1.331 | 1.331 | 1.34923262 |
| 4 | 0.4 | 1.4641 | 1.4641 | 1.49090205 |
| 5 | 0.5 | 1.61051 | 1.61051 | 1.64744677 |
| 6 | 0.6 | 1.771561 | 1.771561 | 1.82042868 |
| 7 | 0.7 | 1.9487171 | 1.9487171 | 2.01157369 |
| 8 | 0.8 | 2.14358881 | 2.14358881 | 2.22278892 |
| 9 | 0.9 | 2.35794769 | 2.35794769 | 2.45618176 |
| 10 | 1 | 2.59374246 | 2.59374246 | 2.71408085 |
Euler: yn+1 = yn + h·f(xn, yn). Heun adds a corrector: yn+1 = yn + h/2·(f(xn, yn) + f(xn+1, ŷn+1)).
Solution curve
Blue: Euler. Green: improved Euler (Heun).
Euler's method is first order: halving h roughly halves the error. Heun is second order and usually much closer, which is why the two columns drift apart as the interval grows.
What is the Euler's Method Calculator?
The ByteTools Euler's Method Calculator solves the initial value problem dy/dx = f(x, y) with y(x₀) = y₀ by stepping yₙ₊₁ = yₙ + h·f(xₙ, yₙ) forward to the endpoint you choose.
- Standard Euler stepping with a full step-by-step table
- Optional improved Euler (Heun) column for direct comparison
- Plotted solution curve with the step nodes marked
- Steps towards the endpoint whichever direction you set
- Detects and reports a solution that blows up mid-run
- Runs entirely in your browser with nothing uploaded
How to use the Euler's Method Calculator
- 1
Enter the right-hand side of dy/dx = f(x, y) using x and y, for example x + y.
- 2
Set the initial values x₀ and y₀ from your initial condition.
- 3
Enter the x value to solve up to, and the step size h.
- 4
Tick the Heun option to compare improved Euler against plain Euler.
- 5
Read the final values, follow the step table and check the plotted solution curve.
About the Euler's Method Calculator
The ByteTools Euler's Method Calculator solves the initial value problem dy/dx = f(x, y) with y(x₀) = y₀ by stepping yₙ₊₁ = yₙ + h·f(xₙ, yₙ) forward to the endpoint you choose. Every step appears in a table with xₙ, yₙ and the slope used, so the method is completely transparent.
An optional improved Euler (Heun) column runs alongside it, using the predictor-corrector form yₙ₊₁ = yₙ + h/2·(f(xₙ,yₙ) + f(xₙ₊₁, ŷₙ₊₁)). Because Euler is first order and Heun is second, the two columns drift apart as the interval grows — which is the clearest way to see what 'order of accuracy' actually means.
The approximate solution is plotted so you can see its shape. All computation happens in your browser; the equation and initial values never leave your device.
Frequently asked questions
What is Euler's method used for?
It approximates the solution to a differential equation you cannot or do not want to solve exactly. Starting from a known point, it repeatedly follows the slope the equation gives for a small step, tracing out an approximate solution curve.
How accurate is Euler's method?
It is first order, meaning the error is roughly proportional to the step size — halve h and you roughly halve the error. That is fairly crude, which is why the improved Euler column, being second order, usually lands much closer.
What is the difference between Euler's method and improved Euler?
Plain Euler uses the slope at the start of each step. Improved Euler, or Heun's method, also predicts the slope at the end of the step and averages the two. That averaging cancels much of the error and gives second-order accuracy for one extra evaluation.
What step size should I use for Euler's method?
Smaller steps are more accurate but need more of them. A step that divides the interval into 10 to 20 pieces is typical for hand-checkable work. If the two columns disagree noticeably, your step size is probably too large.
Why did my solution blow up?
Some equations are unstable, and Euler's method amplifies that: values grow each step until they exceed what floating point can hold. A smaller step size often fixes it, but a genuinely unstable equation will diverge regardless, which the tool reports rather than showing garbage.
Related tools
Newton's Method Calculator
Find a root of any function by Newton-Raphson iteration. See every step in a table with xₙ, f(xₙ), f′(xₙ) and the shrinking step size.
Derivative Calculator
Differentiate any function of x symbolically. Get f′(x) and f″(x) in simplified form, their value at a point, and a numerical check of the result.
Definite Integral Calculator
Evaluate a definite integral numerically with adaptive Simpson's rule. See the value, the error estimate and a shaded plot of the area under the curve.
Riemann Sum Calculator
Compute left, right, midpoint and trapezoidal Riemann sums with a full per-rectangle table and a drawing of the rectangles under your curve.
Taylor Series Calculator
Expand a function as a Taylor or Maclaurin series about any centre. Get the polynomial, the coefficients, the truncation error and the radius of convergence.