acalculator

What is my exponential function?

Type a and b of f(x) = a·bˣ, or two points the function passes through, and an x. The exponential function calculator shows f(x), the equation, the percent growth or decay per step, and the doubling time or half-life, with a chart of the curve.

Your numbers

I know
f(x)
162.8894627

f(x) = 100·1.05ˣ; at your x, f(x) = 162.8894627.

Function
f(x) = 100·1.05ˣ
a (initial value)
100
b (growth factor)
1.05
Rate per step
5%
Growth or decay
Exponential growth
Continuous rate k
0.04879016417
Doubling time or half-life
14.20669908

f(x): 162.8894627. f(x) = 100·1.05ˣ; at your x, f(x) = 162.8894627.

f(x) = a·bˣ, with the point at x

How to calculate

Evaluates f(x) = a·bˣ, or finds the exponential function through two points, with the percent growth or decay rate, the continuous rate k = ln b, and the doubling time or half-life.

Example with the default inputs (I know a and b, a (initial value) 100, b (base) 1.05, x 10): f(x) = 100·1.05ˣ; at your x, f(x) = 162.8894627.

Method: f(x) = a·bˣ; from two points, b = (y₂ ÷ y₁)^(1 ÷ (x₂ − x₁)) and a = y₁ ÷ b^x₁; rate = (b − 1) × 100%; k = ln b; doubling time or half-life = ln 2 ÷ |ln b|.

  • a ≠ 0, b > 0 and b ≠ 1 (OpenStax’s definition of an exponential function).
  • Typed numbers are exact decimals; whole powers are exact, roots and fractional powers are decimal numbers.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. I know Two points, x₁ -2, y₁ 6, x₂ 2, y₂ 1, x 0 gives a (initial value) 2.44949, b (base) 0.638943, f(x) 2.44949, Growth or decay Exponential decay.Source: OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions, Example 5 (f(x) = 2.4492(0.6389)ˣ through (−2, 6) and (2, 1)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions
  2. I know a and b, a (initial value) 100, b (base) 1.05, x 10 gives f(x) 162.889463, Rate per step 5%, Growth or decay Exponential growth, Doubling time or half-life 14.206699.Source: OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions (f(x) = abˣ, b > 1 is growth), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions
  3. I know Two points, x₁ 0, y₁ 3, x₂ 1, y₂ 12, x 3 gives a (initial value) 3, b (base) 4, f(x) 192, Rate per step 300%.Source: OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions (writing f(x) = abˣ from two points), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions
  4. I know a and b, a (initial value) 80, b (base) 0.5, x -2 gives f(x) 320, Doubling time or half-life 1, Rate per step -50%.Source: OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions (0 < b < 1 is decay), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions

How it works

From a and b. f(x) = a·bˣ.

From two points (x₁, y₁) and (x₂, y₂):

  • b = (y₂ ÷ y₁)^(1 ÷ (x₂ − x₁))
  • a = y₁ ÷ b^x₁
  • then f(x) = a·bˣ at the x you type.

For both:

  • Rate per step = (b − 1) × 100%.
  • Growth or decay: growth when b > 1, decay when b < 1.
  • Continuous rate k = ln b (natural log), so f(x) = a·e^(kx).
  • Doubling time or half-life = ln 2 ÷ |ln b|, in units of x.
  • Function shows a and b to 10 significant figures: f(x) = a·bˣ.

Rules. a may not be 0 and b may not be 1 (b must also be more than 0, a field limit). For two points: x₁ and x₂ must differ; y₁ and y₂ may not be 0, must have the same sign, and may not be equal (that gives b = 1). When f(x), a or b is too large or too small to show as a number (beyond about 1.8 × 10³⁰⁸ or rounding to 0), or b is so close to 1 that ln b is 0, there is no answer. Each of these gives a message instead of an answer. a, b and the points are from −1,000,000,000 to 1,000,000,000 (b above 0), and x from −10,000 to 10,000.

Exact arithmetic. Typed numbers are read as exact decimals (1.05 is exactly 105/100). A whole power with an exponent from −4,096 to 4,096 is exact, so 100 × 1.05¹⁰ is exactly 162.889462677744140625. From two points, b is exact when x₂ − x₁ is 1 or −1 (b = y₂ ÷ y₁ or its reciprocal), and a is then exact when x₁ is whole. Any other root or fractional power is a decimal number. The rate, k and the doubling time use b as a decimal number.

Output format. f(x), a, b, k and the doubling time or half-life show with up to 10 significant figures, and the rate as a percent with up to 10 significant figures, each rounded half up from its value.

Worked examples by hand

Through (−2, 6) and (2, 1), at x = 0 (OpenStax Example 5). b = (1 ÷ 6)^(1 ÷ 4) = 0.6389431042; a = 6 ÷ b⁻² = 6 × b² = √6 = 2.449489743; f(0) = a. Decay.

a = 100, b = 1.05, at x = 10. 1.05¹⁰ = 1.62889462677744140625, so f(10) = 162.8894627. Rate 5%, growth; k = ln 1.05 = 0.04879016417; doubling time 0.6931471806 ÷ 0.04879016417 = 14.20669908.

Through (0, 3) and (1, 12), at x = 3. b = 12 ÷ 3 = 4, a = 3 ÷ 4⁰ = 3; f(3) = 3 × 64 = 192. Rate (4 − 1) × 100 = 300%.

a = 80, b = 0.5, at x = −2. f(−2) = 80 × 0.5⁻² = 80 × 4 = 320. Rate −50%, decay; half-life ln 2 ÷ ln 2 = 1.

Other questions people ask

What is an exponential function?

A function f(x) = a·bˣ, where a is a nonzero number (the initial value, f(0)) and b is a positive number other than 1 (the base). Each time x goes up by 1, f is multiplied by b.

How do I find an exponential function from two points?

Put both points into y = a·bˣ and divide one equation by the other: y₂ ÷ y₁ = b^(x₂ − x₁), so b = (y₂ ÷ y₁)^(1 ÷ (x₂ − x₁)), then a = y₁ ÷ b^x₁. Through (−2, 6) and (2, 1): b = (1/6)^(1/4) = 0.6389 and a = 6 × 0.6389² = 2.4495, as in OpenStax’s Example 5.

How can I tell growth from decay?

From b. When b > 1 the function grows; when 0 < b < 1 it decays. The rate per step is (b − 1) × 100%: b = 1.05 grows 5% per step, b = 0.5 shrinks 50% per step.

What is the continuous rate k?

k = ln b, so the same function is f(x) = a·e^(kx). For b = 1.05, k = 0.04879, a little less than the 5% step rate.

How do I find the doubling time or the half-life?

Divide ln 2 by |ln b|. For b = 1.05 the doubling time is 0.6931 ÷ 0.04879 = 14.21 steps of x; for b = 0.5 the half-life is exactly 1.

Why can’t y₁ and y₂ have different signs?

bˣ is always positive, so a·bˣ always has the sign of a. Two points on opposite sides of the x-axis, or a point on it, cannot be on one exponential function.