Euler's Method Calculator
Enter a, b, the initial point, step size and step count to run Euler's method.
Result
How it is calculated
The tool solves only the linear equation y′ = a·x + b·y, where you type the constants a and b. Starting from (x0, y0) it repeats yn+1 = yn + h × (a·xn + b·yn) and xn+1 = xn + h, where h is the step size and n the number of steps. The step size must be above zero, n is rounded to a whole number and must be between 1 and 10,000. For readability the table lists only steps 0, 1, 2 and the last step, with dots in between, followed by the final point. Values are shown to four decimals. The result is an approximation whose error grows with h and with the number of steps.
Worked example
Take y′ = x + y with a = 1, b = 1, starting at x = 0, y = 1, with h = 0.1 and 10 steps. Step 1: slope = 0 + 1 = 1, so y = 1 + 0.1 × 1 = 1.1 and x = 0.1. Step 2: slope = 0.1 + 1.1 = 1.2, so y = 1.1 + 0.12 = 1.22. Continuing to step 10 reaches x = 1.0000, y = 3.1875. The exact solution y = 2ex − x − 1 gives 3.4366 at x = 1, so Euler underestimates by about 0.25 with this step size.
Common mistakes
- Using the tool for an equation of another form, such as y′ = x·y or y′ = y². Only the linear form a·x + b·y is supported, so a nonlinear right-hand side cannot be entered.
- Entering the end value of x instead of the number of steps. If you want to reach x = 2 from 0 with h = 0.1, enter n = 20, not 2.
- Choosing a step size that is too large. With a large h the curve can drift far from the exact solution, and with a negative b it can even oscillate or blow up; halve h and compare.
- Expecting every step in the table. The tool prints only the first two and last steps; run it again with a different n if you need an intermediate value.
About this calculator
Euler's method is the simplest numerical technique for approximating the solution of an ordinary differential equation when no closed-form solution is available or convenient. For a linear ODE y′ = a·x + b·y with a known starting point, it steps forward in small increments of size h using y_{n+1} = y_n + h·(a·x_n + b·y_n) — at each step, it just follows the tangent line given by the current derivative for one step's length, then recalculates the slope at the new point.
This calculator builds the full step-by-step table so you can see how the approximation evolves, alongside the final estimated point. Euler's method has a local truncation error of O(h²) per step and a global error of O(h), meaning halving the step size roughly halves the total error — it's rarely used for high-precision work in practice (more accurate methods like Runge-Kutta 4 are preferred), but it remains the standard first algorithm taught in numerical analysis because it makes the core idea of numerical ODE solving — approximate the curve using its own slope, one small step at a time — completely transparent.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Halving the step is the quickest accuracy test. For y′ = x + y from y(0) = 1, h = 0.1 over 10 steps ends at 3.1875 and h = 0.05 over 20 steps ends at 3.3066, so the two runs disagree and neither is final. A decay with b = −10 and h = 0.25 is worse: y goes to −1.5000, then 2.2500, and ends at 5.0625 after 4 steps, growing instead of dying out. Which equation are you stepping through?