Runge–Kutta Method Calculator

Compute IVP solutions with RK1 through RK45 methods. Compare step sizes, errors, and tables. Download clear reports for assignments and projects.

Allowed: x, y, + − * / ( ) ^ and functions like sin, exp, log.
RK45 adapts step size to meet a tolerance.
For RK45, this is the initial step size.
Used only when RK45 is selected.
Stops safely if the target is not reached.
Controls displayed rounding and downloads.
Reset
Example data
Try this sample initial value problem
This example uses y′ = x + y with y(0)=1 on [0, 1].
Equation y′ x₀ y₀ x_end h Suggested method
x + y 0 1 1 0.1 RK4 (Classic)
sin(x) - y 0 0 6.28 0.05 RK45 (Adaptive)
Formula used

Runge–Kutta IVP model

We solve y′ = f(x, y) with y(x₀)=y₀ using step updates.

Classic RK4 update

k1 = f(xn, yn)
k2 = f(xn + h/2, yn + h·k1/2)
k3 = f(xn + h/2, yn + h·k2/2)
k4 = f(xn + h, yn + h·k3)
yn+1 = yn + (h/6)(k1 + 2k2 + 2k3 + k4), xn+1 = xn + h

Adaptive RK45 idea

RK45 computes a 5th-order and 4th-order estimate at each step. Their difference estimates local error, then the step size is adjusted to meet your tolerance.

How to use this calculator
  1. Enter y′ = f(x, y) using allowed operators and functions.
  2. Provide x₀, y₀, and the target x_end.
  3. Choose a method. RK4 is a strong default. Use RK45 for accuracy control.
  4. Set h and optional tolerance for RK45.
  5. Press Submit. Your result appears above the form.
Notes
  • If values explode or become NaN, reduce step size or use RK45.
  • Solve backwards by setting x_end < x₀; the step direction adjusts automatically.
  • Expressions using ^ are treated as exponentiation.

Related Calculators

inverse laplace transform calculatortaylor series expansion calculatorexact differential equation calculatorequilibrium points calculatormidpoint method calculatorcharacteristic equation calculatorhomogeneous differential equation calculatornonhomogeneous differential equation calculatorsecond order differential equation calculatorheun method calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.