Differential Equations

Euler’s Method Calculator

Euler’s method and RK4 for y′ = f(x, y), with every step tabulated.

Tool no.
ECT-E03
Rev
1.0
Updated
Oct 2026
Method
Euler and RK4
Examples

Given

Use x and y. Supports + − * / ^, sqrt, exp, ln, sin, cos, tan and more.

Solution

y ≈ —
Runs in your browser. Nothing you enter is uploaded.Euler · Runge–Kutta 4
How to use this calculator

Type the slope function y′ = f(x, y), the starting point, the step size and how many steps to take. The final x is x₀ + n·h. Compare Euler with RK4, then halve h to see how each one converges.

Methods

Euler’s methodyi+1 = yi + h f(xi, yi)
Runge–Kutta 4yi+1 = yi + h6(k1 + 2k2 + 2k3 + k4)

Worked example

y′ = x + y, y(0) = 1, h = 0.1, 10 steps (the default)

  1. First Euler step: y1 = 1 + 0.1 × (0 + 1) = 1.1.
  2. After 10 steps Euler gives y(1) ≈ 3.1875; RK4 gives 3.43656.
  3. The exact solution is y = 2ex − x − 1, so y(1) = 3.43656: RK4 is correct to 5 decimals, Euler is off by 7%.

Frequently asked questions

When should I use Euler’s method?

For learning and quick estimates. Its error is proportional to h, so accurate answers need very small steps. RK4 is the standard workhorse for real problems.

Why does my solution blow up?

Either the true solution does (y′ = y² reaches infinity in finite time), or the step is too large for a fast-decaying equation such as y′ = −50y. Try a smaller h.