ForHosting KIT · Math

Exponential function from two points

Give two points and get the exponential function through them: (0, 3) and (1, 6) give a starting value of 3 and a base of 2, so the model is 3 · 2ˣ and it grows. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
X1
0
Y1
3
X2
1
Y2
6
You get
A
3
B
2
Equation
y = 3 * 2^x
Kind
growth

An exponential model of the form y equals a times b to the power x is completely determined by any two admissible points that share a real multiplicative pattern. Students, tutors, data notebooks, and automation scripts keep converting a pair of observations into that initial value a and that positive base b so they can write the function, classify growth versus decay, and evaluate later inputs. This exponential function from two points calculator accepts the coordinates of both points, solves the two-equation system in closed form, and returns a, b, and the display string y = a * b^x.

How two points determine y = a * b^x

The exponential model y equals a times b to the x is the unique two-parameter family that grows or decays by a constant multiplicative factor when the independent variable increases by one. Given two points (x1, y1) and (x2, y2) with distinct first coordinates, the ratio of the y-values isolates the base: y2 over y1 equals b raised to the power of x2 minus x1. Taking the real power one over that horizontal gap produces b equals (y2 over y1) to the power one over (x2 minus x1).

The initial value then follows by back-substitution: a equals y1 divided by b to the x1, which is also y2 divided by b to the x2. Both identities are closed form; this capability never iterates, never samples random seeds, and never consults a computer-algebra kernel. Real numbers require a strictly positive ratio y2 over y1, so the two y-coordinates must be non-zero and must share a sign.

Opposite signs would force the graph of a times b to the x to cross the horizontal axis, which a genuine exponential of this form never does when the base is positive. A zero y-value is equally impossible: the model can approach zero asymptotically but never lands on it. Equal x-coordinates leave the system under-determined or inconsistent, because a function cannot assign two different y-values to one x, and two copies of the same point do not pin down both a and b.

When those domain checks pass, the pair determines exactly one real pair (a, b) with b positive, and the printed function is written in the textbook a times b to the x form.

Where a model from two points helps

Algebra classrooms and tutoring platforms use an exponential function from two points calculator so learners can check the initial value and the base without mixing up the order of the ratio or the sign of the exponent gap. Exam generators and LMS auto-graders need a deterministic oracle that marks wrong an invented base, rejects a pair that changes sign, and returns one canonical equation string so a grader can compare exactly or re-parse a and b. Failed validation does not consume balance.

Keep requests small, pin the rounded a, b, and equation string in tests, and you get a reproducible exponential model for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.

Classroom and homework checks

Students enter two points and verify the fitted y = a * b^x against textbook ratio-and-root steps, including growth versus decay.

Exam and LMS auto-grading

Score exponential-model items with a deterministic a, b, and canonical equation string instead of hand-graded partial credit.

Two measured states of a growing or decaying quantity

Turn two laboratory or ledger observations into a closed-form exponential for notebooks, dashboards, or calibration scripts.

How do I find the exponential function through two points?

Send finite numbers x1, y1, x2, and y2.

Why must the two y-values have the same sign and be non-zero?

A real model y = a * b^x with positive base never hits zero and never changes sign. Opposite signs or a zero y-value have no unique real solution of this form.

What if the two x-coordinates are equal?

A unique exponential y = a * b^x needs two distinct x-values; one x cannot pin down both a and b.

How does the calculator tell growth from decay?

The kind field is growth when the fitted base b is greater than 1, decay when 0 < b < 1, and constant when b equals 1 (the two y-values match).

Does the order of the two points matter?

No. Swapping the points gives the same starting value and base, because the model has to pass through both of them either way. The result also checks that each point lies on the curve.

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/algebra/exponential-model-from-two-points

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/algebra/exponential-model-from-two-points \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"x1":0,"y1":3,"x2":1,"y2":6}'
{
  "x1": 0,
  "y1": 3,
  "x2": 1,
  "y2": 6
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.exponential_model_from_two_points",
  "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.

When the x-coordinates coincide, a y-value is zero, or the two y-values have opposite signs, no unique real model of this form exists and the task fails with invalid_input instead of inventing a base.

Input contract, response shape, and error behaviour

POST a JSON body with four required finite numbers: x1 and y1 for the first point, and x2 and y2 for the second. Each field may arrive as a JSON number or as a decimal numeric string; missing fields, empty strings, NaN, and Infinity fail with invalid_input naming the field. If y1 or y2 is zero, or if the two y-values have opposite signs, the request is rejected with a message that a real exponential of this form never crosses zero and never changes sign. Those failures are not billed. On success the body echoes the four coordinates, the initial value a, the positive base b, an equation string such as y = 3 * 2^x, a kind field equal to growth when b is greater than one, decay when b is between zero and one, or constant when b is one, a formula field restating the two identities, and a check object that re-evaluates the fitted model at both given x-values. Example: x1 equals zero, y1 equals three, x2 equals one, y2 equals six yields a equals three, b equals two, kind growth, and the equation y = 3 * 2^x, because six over three is two and the horizontal gap is one. Pair the response with your own graphing code if you need a sketch of the curve; this endpoint fits the two parameters only and does not emit plots or multi-step prose beyond the formula field.

Where an exponential-from-two-points API earns its keep

Science and finance notebooks often know two measured states of a quantity that should grow or decay by a constant factor—culture counts, remaining mass, or a balance after equal compounding periods—and calling a tiny parse API avoids pulling a full computer-algebra system for four coordinates.

What does the exponential function from two points calculator cost?

The browser tool is free. API requests use prepaid balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →