Calculators King

Regression and Correlation

Exponential Regression Calculator

Positive responses are fitted on the log scale as ln y equals A plus B x, then rewritten as y equals a times an exponential in B x.

Worksheet

Press Calculate to see the result.

Positive responses are fitted on the log scale as ln y equals A plus B x, then rewritten as y equals a times an exponential in B x.

What this calculator answers

An exponential curve becomes a straight line after you take the natural log of y. The page fits that straight line by least squares, so the residuals it shrinks are gaps in ln y, not gaps in y itself. The intercept A on the log scale becomes a multiplier a equal to e to the A, and the slope B stays the rate inside the exponential. Because the fit lives on the log scale, a point with a tiny y can pull the line as hard as a point with a huge y. Every y in the table has to be positive so the logarithm exists.

The page reports a and B in y = a e^(B x), plus the R squared of the straight line fitted to ln y. Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.

The formula, written out

Log-linear exponential fit uses this relationship.

ln y = A + B x, then a = exp(A), so y = a e^(B x)

  • A. Intercept of the line fitted to ln y.
  • B. Slope of that log-scale line.
  • a. exp(A), the curve's height at x = 0.
  • log-scale R squared. The R squared of the fit to ln y, not to raw y.

Least squares on ln y chooses A and B. Exponentiating the intercept returns the multiplier a. The slope is not re-estimated on the raw scale, which is why the fit is described as a log-scale fit. The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.

A full worked example

Example loaded in the worksheet

The form is prefilled with a small example so every arithmetic step can be checked by hand. Change one field after you finish the walkthrough and confirm the ticket moves the way the formula predicts.

Every y is positive, so ln y is defined for all 4 pairs. The fit is on the log scale: least squares is applied to ln y, not to y. The log-scale intercept A is 1.0986 and the log-scale slope B is 0.6931.

a = exp(1.0986) = 3. The curve is y = 3 e^(0.6931 x). R squared of the straight line in ln y is 1. That figure describes the log scale.

At the first x of 0, ln y is 1.0986 and the line predicts 1.0986. The matching curve height is 3 against a typed y of 3.

Figures from the worked example
Equationy = 3 e^(0.6931 x)
a3
B0.6931
R-squared on the log scale1

A second situation

A decaying curve, y halved at each step

Every y is positive, so ln y is defined for all 4 pairs. The fit is on the log scale: least squares is applied to ln y, not to y. The log-scale intercept A is 2.7726 and the log-scale slope B is −0.6931.

a = exp(2.7726) = 16. The curve is y = 16 e^(−0.6931 x). R squared of the straight line in ln y is 1. That figure describes the log scale.

At the first x of 0, ln y is 2.7726 and the line predicts 2.7726. The matching curve height is 16 against a typed y of 16.

Figures from the worked example
Equationy = 16 e^(−0.6931 x)
a16
B−0.6931
R-squared on the log scale1

A perfect doubling has log-scale R squared equal to 1. Moving the last point off the doubling line lowers that R squared and changes B. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.

What moves when the input moves

The last y moved from 24 to 20, so the points leave a perfect doubling. The headline result went from y = 3 e^(0.6931 x) to y = 3.1114 e^(0.6385 x).

The nudged inputs

Every y is positive, so ln y is defined for all 4 pairs. The fit is on the log scale: least squares is applied to ln y, not to y. The log-scale intercept A is 1.1351 and the log-scale slope B is 0.6385.

a = exp(1.1351) = 3.1114. The curve is y = 3.1114 e^(0.6385 x). R squared of the straight line in ln y is 0.9951. That figure describes the log scale.

At the first x of 0, ln y is 1.0986 and the line predicts 1.1351. The matching curve height is 3.1114 against a typed y of 3.

Figures from the worked example
Equationy = 3.1114 e^(0.6385 x)
a3.1114
B0.6385
R-squared on the log scale0.9951

How to read the result

Read B as the continuous rate on the log scale. A positive B means the fitted curve rises as x rises. The reported R squared describes ln y. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.

Write the result with its unit, the inputs that produced it, and the name of the formula. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.

Assumptions that have to stay true

  • Every y is strictly positive.
  • You want the least-squares line on ln y, not a nonlinear fit on raw y.
  • At least three pairs are typed.
  • The x values are not all the same.

If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.

Mistakes that change the answer

  • Quoting the log-scale R squared as if it were the R squared of raw y.
  • Including a zero or a negative y and expecting a logarithm.
  • Comparing this B with the slope from the line of best fit page. Those slopes are in different units.
  • Using the curve below zero. The rewritten equation stays positive.

Where a different calculator is the honest choice

Use the quadratic regression calculator for an additive bend in x squared. Use the linear regression calculator when y itself should be the straight-line response. Use the half-life calculator when the rate is already a known half-life rather than a fitted slope. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.

When the job changes, move to a page built for that job: Quadratic Regression Calculator, Linear Regression Calculator.

Check yourself

The fit gives A = 0 and B = 0.693 on the natural log scale, and e^0.693 is about 2. What is the curve?

a is e^0 = 1, and the curve is about y = 1 times e to the 0.693 x, which doubles when x increases by 1.

Using the result in a sentence

Growth of a positive count, a fading concentration, and a doubling time estimated from a short table are the usual exponential fits. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.

Log-scale least squares is not the same objective as minimising squared errors in y. A value near zero has a large say on the log scale. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.

Questions people ask next

01What definition does the Exponential Regression Calculator commit to?

This page uses Log-linear exponential fit: ln y = A + B x, then a = exp(A), so y = a e^(B x). Least squares on ln y chooses A and B. Exponentiating the intercept returns the multiplier a. The slope is not re-estimated on the raw scale, which is why the fit is described as a log-scale fit. If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for Pairs, one x y per line, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.

02How should the worked example be read out loud?

In the loaded example the equation is y = 3 e^(0.6931 x). Read B as the continuous rate on the log scale. A positive B means the fitted curve rises as x rises. The reported R squared describes ln y. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.

03What is the fastest way to get a misleading result?

Quoting the log-scale R squared as if it were the R squared of raw y. Log-scale least squares is not the same objective as minimising squared errors in y. A value near zero has a large say on the log scale. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.

04When should I leave this page for a different calculator?

Use the quadratic regression calculator for an additive bend in x squared. Use the linear regression calculator when y itself should be the straight-line response. Use the half-life calculator when the rate is already a known half-life rather than a fitted slope. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.

05What belongs in the sentence next to the number?

a is e^0 = 1, and the curve is about y = 1 times e to the 0.693 x, which doubles when x increases by 1. Name the formula, the sample size or the inputs, and the unit before you compare the figure with someone else's. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.