Solving a^x = b Formula Solver with Worked Examples

To solve , take logs of both sides: . Use the calculator to find , or the base .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Give every value except the one you want, or write the letter with a question mark, for example a=3, b=20 or a=2, b=32. Every answer is checked by putting it back into the formula.

  • : the result
  • : the base
  • : the unknown power

Before you start

This page is easier if you are comfortable with:

What Solving a^x = b means

When the unknown is in the power, logarithms bring it down: . Dividing both sides by gives .

You can use logs to any base, as long as you use the same base on top and bottom, so the or button both work.

If is an exact power of , the answer is a whole number; otherwise it is a decimal. It uses the definition of a logarithm and change of base, the model is compound interest, and the rules are the power law.

This page is part of Logarithms and exponentials in Algebra. Topics that work alongside it: Definition of a logarithm, Change of base, Compound interest / repeated percentage change, Reduction to linear form: y = ab^x, Reduction to linear form: y = ax^n and Exponential and natural logarithm are inverses.

What is it used for?

To solve an equation like aˣ = b where x is the unknown power, take logarithms of both sides: x = log b ÷ log a.

How to use the solving a^x = b formula

  1. Write the equation .
  2. Take logs of both sides.
  3. Use the power law: .
  4. Divide by and calculate.

Graph

Solving 2ˣ = 20 by the graphx ≈ 4.32-101234560510152025303540Solving 2ˣ = 20 by the graphxyy = 2^xy = 20Graph with x from -1 to 6 and y from -2 to 40. Shows the curve y = 2^x; the curve y = 20; point x ≈ 4.32 at (4.32, 20).

The curve meets the line y = 20 at x = log 20 ÷ log 2 ≈ 4.32.

Worked examples

Each example below was worked out by the solver on this page and checked by substituting the answer back into the formula.

Example 1: a non-integer answer

Solve , giving to 3 significant figures.

Solving a^x = b Answer checked
Answer
x≈2.727x\approx 2.727
  1. The formula
    Solving a^x = b. In this formula is the the result, is the the base, is the the unknown power.
  2. What we know and what we want
    We know and we want to find , the the unknown power.
  3. Rearrange for
    Take logs of both sides, then divide by log a.
  4. Substitute the numbers
  5. Calculate
  6. Check by substituting back
    Put all the values back into the original formula: both sides should match.

Example 2: an integer answer

Solve .

Solving a^x = b Answer checked
Answer
x≈5x\approx 5
  1. The formula
    Solving a^x = b. In this formula is the the result, is the the base, is the the unknown power.
  2. What we know and what we want
    We know and we want to find , the the unknown power.
  3. Rearrange for
    Take logs of both sides, then divide by log a.
  4. Substitute the numbers
  5. Calculate
  6. Check by substituting back
    Put all the values back into the original formula: both sides should match.

Example 3: compound growth

How many years does it take money to double at 5% compound interest? Solve .

Solving a^x = b Answer checked
Answer
x≈14.21x\approx 14.21
  1. The formula
    Solving a^x = b. In this formula is the the result, is the the base, is the the unknown power.
  2. What we know and what we want
    We know and we want to find , the the unknown power.
  3. Rearrange for
    Take logs of both sides, then divide by log a.
  4. Substitute the numbers
  5. Calculate
  6. Check by substituting back
    Put all the values back into the original formula: both sides should match.

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

A non-integer answer

3ˣ = 20: x = log 20 ÷ log 3 ≈ 2.73

Divide the logs.

An integer answer

2ˣ = 32: x = 5

It checks exactly.

Compound growth

1.05ˣ = 2: x ≈ 14.21 years

Doubling time at 5%.

Finding the base

aˣ = 81 with x = 4: a = 3

a = b^(1/x).

Word problems

To solve aˣ = b take logs of both sides: x = log b ÷ log a.

A non-integer power

Solve 3ˣ = 20 to 2 decimal places.

  1. Take logsx log 3 = log 20
  2. Dividex = 1.3010 ÷ 0.4771
  3. Calculatex = 2.73
  4. Check: 3^2.73 is about 20 ✓x = 2.73.

An integer power

Solve 2ˣ = 32.

  1. Take logsx = log 32 ÷ log 2
  2. Calculatex = 5
  3. Check: 2⁵ = 32 ✓x = 5.

Doubling time Higher

Money grows at 5% a year. How many years to double? Give 2 decimal places.

  1. Equation1.05ˣ = 2
  2. Solvex = log 2 ÷ log 1.05
  3. Calculatex = 14.21
  4. Check: 1.05^14.21 is about 2 ✓About 14.21 years.

Another base Higher

Solve 5ˣ = 100 to 2 decimal places.

  1. Take logsx = log 100 ÷ log 5
  2. Calculatex = 2 ÷ 0.6990 = 2.86
  3. Check: 5^2.86 is about 100 ✓x = 2.86.

Common mistakes

Dividing the numbers

x = 20 ÷ 3 = 6.67 ✗

x = log 20 ÷ log 3 = 2.73 ✓

The unknown is a power.

Dividing log b by the base

x = log 20 ÷ 3 = 0.43 ✗

x = log 20 ÷ log 3 ✓

Take the log of the base too.

Taking the log of a quotient

x = log(20 ÷ 3) = 0.82 ✗

x = log 20 ÷ log 3 ✓

log(b ÷ a) is a different thing.

Guessing and stopping

trying 3² = 9 and 3³ = 27 ✗

use logs for an exact value ✓

Trial gives only a range.

Exam tips

  1. x = log b ÷ log a.
  2. Any base of log works.
  3. Do not divide b by a.
  4. Check by raising the base.
  5. Round at the end.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Use the formula to find the the result (b) when the base (a) = 3, the unknown power (x) = 4. Foundation

b = 81

2. Find the the base (a) when the result (b) = 343, the unknown power (x) = 3. Higher

a = 7

3. Find the the unknown power (x) when the result (b) = 4096, the base (a) = 8. Higher

x = 4

4. Use the formula to find the the result (b) when the base (a) = 4, the unknown power (x) = 2. Foundation

b = 16

5. Find the the base (a) when the result (b) = 243, the unknown power (x) = 5. Higher

a = 3

6. Find the the unknown power (x) when the result (b) = 64, the base (a) = 2. Higher

x = 6

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Exponential equation
An equation with the unknown in the power.
Logarithm
The power needed.
Base
The number raised to a power.
Take logs
Apply log to both sides.
Doubling time
The time to double.
Inverse
Undoes another operation.

Frequently asked questions

How do you solve aˣ = b?

x = log b ÷ log a.

Can I use ln?

Yes, ln b ÷ ln a gives the same answer.

What is the doubling time at 5%?

About 14.21 years.

What if b is less than 1?

x is negative when a > 1.

Which page covers the definition?

definition of a logarithm.

Which page covers the base change?

change of base.

More in Algebra and the formula sheets.