ForHosting KIT · Developer Utilities

Newton-Raphson Single Step Calculator

This Newton-Raphson single step calculator performs exactly one root-finding update from a current estimate.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter a function f(x), its derivative f'(x), and the present value x_n. The calculator evaluates both expressions at that point, divides the function value by the derivative, and subtracts the resulting correction to produce x_(n+1). It also returns every intermediate number, making the result useful for checking homework, documenting a numerical workflow, or inspecting one iteration before deciding whether to continue.

Enter the function, derivative, and current estimate

Start by writing the function whose root you want to approximate and a separate expression for its derivative. Both expressions use x as the variable. Arithmetic operators, parentheses, powers, constants pi and e, and common functions such as sin, cos, tan, exp, log, sqrt, and abs are supported. Write multiplication explicitly, as in 2*x rather than 2x. For the classic square-root example f(x) = x^2 - 2, enter x^2 - 2 for the function and 2*x for the derivative. Then supply x_current, the estimate at which this one iteration begins. A good initial estimate is normally near the root and lies in a region where the derivative exists and is not zero. The calculator accepts optional prefixes such as f(x) = and f'(x) =, but plain expressions are the clearest choice for scripts and copied calculations. Values are treated as dimensionless numbers, so if the function represents a physical quantity, keep the units consistent throughout the expression and estimate. The parser handles mathematical syntax only and never evaluates program code. Expressions are length-bounded, and every supplied or computed numeric value must be finite. These restrictions make a saved input reproducible and prevent an apparently successful update from hiding an undefined operation.

Follow the single Newton-Raphson update

Newton-Raphson uses the tangent line at the current estimate to predict where the graph crosses the x-axis. The calculator first evaluates f(x_current) and f'(x_current). It then forms the correction f(x_current) / f'(x_current) and applies x_next = x_current - correction. The output exposes the current estimate, function value, derivative value, correction, and next estimate, so each part of the arithmetic can be reviewed independently. For x^2 - 2 at x_current = 1.5, the function value is 0.25 and the derivative value is 3. Dividing gives a correction of about 0.0833333333, which is subtracted to obtain about 1.4166666667. Only one update is performed: the returned x_next is not fed back into the formula automatically. That deliberate boundary makes this capability suitable for lessons, step-by-step worksheets, controlled pipelines, and algorithms in which another system decides when to stop. The precision option changes only how many decimal places appear in the JSON result. Expression evaluation and the subtraction use JavaScript floating-point values before presentation rounding, so choosing fewer displayed places does not cause a sequence of hidden intermediate roundings within this step. If the derivative evaluates to zero, or either expression is undefined at the current point, the operation stops with an input error rather than returning an infinite or misleading estimate.

Interpret the next estimate and decide what follows

The next estimate is a numerical proposal, not proof that a root exists or that convergence will occur. Newton-Raphson often converges rapidly when the starting point is sufficiently close to a simple root and the function is smooth there, but a single step cannot establish those conditions. Inspect the magnitude of the function value and correction. A small correction can suggest that the estimate is stabilizing, yet it may also occur where the derivative is very large, so evaluate f(x_next) in a later step before declaring success. Conversely, a large correction warns that the tangent line crosses the axis far from the current point. Repeated iterations may diverge, oscillate, enter a region where the function is undefined, or converge to a different root than intended. Multiple roots also reduce the method's usual convergence speed. For dependable work, define a stopping rule based on both the correction and residual, impose a maximum iteration count, and compare against a bracketing method when the initial interval is known. This calculator intentionally does not estimate the derivative numerically; the derivative expression is explicit, reviewable, and evaluated at exactly the same x_current as the function. That design is helpful when auditing symbolic differentiation, teaching tangent-based root finding, or integrating one deterministic update into a larger solver that owns convergence checks and iteration limits. The API costs $0.002 per request, while the browser version can run the same pure calculation locally.

Check a textbook iteration

Compare a hand-computed Newton-Raphson update with the returned function value, derivative, correction, and next estimate.

Inspect a difficult starting point

Run one controlled update to see whether the tangent correction is reasonable before committing to repeated iterations.

Build a supervised solver

Call one deterministic step at a time while an external workflow applies its own tolerance, logging, and iteration limit.

What does an API request cost?

The API price is $0.002 per request. The browser calculator runs the same pure calculation locally for free.

Does this calculator find the root completely?

No. It performs exactly one Newton-Raphson update. Repeat with x_next as the new x_current only when your convergence policy says to continue.

Why must I provide the derivative?

The Newton-Raphson formula requires f'(x_current). An explicit derivative avoids hidden numerical-difference choices and makes the calculation auditable.

What happens when the derivative is zero?

The request returns an invalid-input error because division by zero cannot produce a valid Newton-Raphson correction.

Which expression syntax is supported?

Use x, numbers, explicit arithmetic, parentheses, powers, pi, e, and common one-argument functions including trigonometric, exponential, logarithmic, square-root, and absolute-value functions.

Does a small correction guarantee convergence?

No. Check the residual at the next estimate and use a stopping rule, an iteration limit, and domain knowledge before accepting a root.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/calculus/newton-raphson-single-step

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/calculus/newton-raphson-single-step \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"function":"x^2 - 2","derivative":"2*x","x_current":1.5}'
{
  "function": "x^2 - 2",
  "derivative": "2*x",
  "x_current": 1.5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "calculus.newton_raphson_single_step",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →