Euler's Method Calculator (+ Formula & e)

Solve a differential equation step by step with Euler's method — see the table, a graph, and how it compares to Improved Euler (Heun) and RK4 against an exact solution. Plus an explorer for Euler's formula e^(iθ)=cosθ+i·sinθ and Euler's number e.

Calculator Numbers & Math Updated Jun 17, 2026
How to Use
  1. Method tab: type the right-hand side of dy/dx = f(x, y) — e.g. x + y, -2*y, or y*(1-y).
  2. Set the starting point (x₀, y₀), the step size h, and the number of steps.
  3. Optionally enter the exact solution y(x) to see the error at each step.
  4. Read the step-by-step table and graph, and compare Euler against Improved Euler (Heun) and RK4.
  5. Formula tab: drag the angle to watch e^(iθ) trace the unit circle. Number-e tab: increase n and the term count to watch the approximations converge on e.

dy/dx = f(x, y)

Euler — y(1)
Improved Euler (Heun)
RK4
Exact
Euler error
Euler Heun RK4 Exact

e = cos θ + i·sin θ

e
cos θ (real)
sin θ (imag)
θ
Euler's identity
At θ = π: e + 1 = 0

Approaching e ≈ 2.7182818…

Continuous compounding

(1 + 1/n)n
Series Σ 1/i!
True e
2.7182818285
(1+1/n)n vs ne
n× compounding
Continuous P·ert

Euler's method, in one line

To solve dy/dx = f(x, y) from a known starting point, Euler's method repeatedly steps forward by a small amount h, each time following the slope at the current point: y(next) = y + h · f(x, y), then x increases by h. It's the foundational idea behind every numerical ODE solver. The catch is accuracy — because each step trusts only the slope at its start, the approximation drifts, and the error shrinks roughly in proportion to the step size.

That's why this tool also runs Improved Euler (Heun), which averages the slope at the start and end of each step, and RK4, which blends four slope samples per step for far higher accuracy. Comparing all three at the same step size against an exact solution makes the trade-off between simplicity and accuracy concrete.

The other two Eulers

Euler's formula — e = cos θ + i·sin θ — says a complex exponential traces the unit circle, and at θ = π it collapses to Euler's identity e + 1 = 0, linking e, i, π, 1, and 0 in a single equation. Euler's number e ≈ 2.718281828 is the base of natural growth: the limit of (1 + 1/n)n, the sum 1 + 1/1! + 1/2! + …, and the engine of continuous compounding A = P·ert.

Reference

Euler step
yₙ₊₁ = yₙ + h·f(xₙ, yₙ)
Heun step
yₙ₊₁ = yₙ + h/2·(k₁ + k₂)
Euler's formula
e^(iθ) = cos θ + i·sin θ
Euler's number
e = lim (1 + 1/n)ⁿ

About the Euler's Method Calculator (+ Formula & e)

Use the Euler's Method Calculator (+ Formula & e) — a free, easy tool for everyday maths and number work. Nothing is uploaded, and you do not need an account. Solve a differential equation step by step with Euler's method — see the table, a graph, and how it compares to Improved Euler (Heun) and RK4 against an exact solution. Plus an explorer for Euler's formula e^(iθ)=cosθ+i·sinθ and Euler's number e.

How it works

Put each value in its box and read the answer as you go. Because it recalculates live, you can play with the inputs to see how each one moves the result — handy for checking your own working or planning ahead. Everything happens on your device, so it is fast and private.

Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.

Frequently Asked Questions

What is Euler's method?

Euler's method is the simplest way to approximate the solution of a first-order differential equation dy/dx = f(x, y). Starting from a known point, it takes small steps of size h, each time moving along the current slope: y(next) = y + h·f(x, y). Smaller steps give a more accurate curve but take more of them.

Why is my Euler answer off, and how do Heun and RK4 compare?

Plain Euler only uses the slope at the start of each step, so it drifts — its error shrinks roughly in proportion to h. Improved Euler (Heun) averages the slope at the start and end of the step and is much better; RK4 samples four slopes per step and is more accurate still. This tool runs all three so you can see the gap against the exact solution.

What can I type for f(x, y)?

Use x and y with + - * / ^ and parentheses, plus functions like sin, cos, tan, exp, ln, log, sqrt, and abs, and the constants pi and e. For example x*y, sin(x) - y, or 3*y*(1 - y/10). Multiplication must be explicit (write 2*x, not 2x).

What is Euler's formula and the identity e^(iπ)+1=0?

Euler's formula says e^(iθ) = cos θ + i·sin θ, so raising e to an imaginary power traces the unit circle in the complex plane. At θ = π that gives e^(iπ) = −1, which rearranges to e^(iπ) + 1 = 0 — Euler's identity, famous for tying together e, i, π, 1, and 0. The Formula tab shows this live.

What is Euler's number e?

e ≈ 2.718281828 is the base of natural growth. It's the limit of (1 + 1/n)^n as n grows, the sum of the series 1 + 1/1! + 1/2! + 1/3! + …, and the factor behind continuous compounding (A = P·e^(rt)). The Number-e tab lets you watch each of these close in on e.

How do I use the Euler's Method Calculator (+ Formula & e)?

Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Learning differential equations

See exactly how a numerical solver marches forward, step by step, with the slope at each point.

Checking homework

Verify an Euler / Heun / RK4 table and the error against the exact solution.

Comparing methods

Watch how much accuracy you gain going from Euler to Heun to RK4 at the same step size.

Visualizing Euler’s formula

Build intuition for complex exponentials by tracing e^(iθ) around the unit circle.

Understanding e

Connect the limit, the series, and continuous compounding as three routes to the same constant.

Last updated: