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.
b = a x
b : the result a : the base x : the unknown power
On this page
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: log ( a x ) = x log a . Dividing both sides by log a gives x .
You can use logs to any base, as long as you use the same base on top and bottom, so the log or ln button both work.
If b is an exact power of a , 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.
Finding how long money takes to double at a given rate of interest. Finding how long a population takes to reach a target. Solving exponential equations in A-level exam questions.
How to use the solving a^x = b formula
Write the equation a x = b . Take logs of both sides. Use the power law: x log a = log b . Divide by log a and calculate.
Graph Solving 2ˣ = 20 by the graph x ≈ 4.32 -1 0 1 2 3 4 5 6 0 5 10 15 20 25 30 35 40 Solving 2ˣ = 20 by the graph x y y = 2^x y = 20 Graph 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 3 x = 20 , giving x to 3 significant figures.
Try this in the solver: a=3, b=20
Solving a^x = b Answer checked
Answer
x ≈ 2.727 x\approx 2.727 x ≈ 2.727 The formula
Solving a^x = b. In this formula b is the the result, a is the the base, x is the the unknown power.
b = a x
What we know and what we want
We know b = 20 , a = 3 and we want to find x , the the unknown power.
Rearrange for x
Take logs of both sides, then divide by log a.
x = log ( a ) log ( b )
Substitute the numbers
x = log ( 3 ) log ( 20 )
Calculate
x ≈ 2.727
Check by substituting back
Put all the values back into the original formula: both sides should match.
20 = 3 2.727 ✓
Example 2: an integer answer Solve 2 x = 32 .
Try this in the solver: a=2, b=32
Solving a^x = b Answer checked
The formula
Solving a^x = b. In this formula b is the the result, a is the the base, x is the the unknown power.
b = a x
What we know and what we want
We know b = 32 , a = 2 and we want to find x , the the unknown power.
Rearrange for x
Take logs of both sides, then divide by log a.
x = log ( a ) log ( b )
Substitute the numbers
x = log ( 2 ) log ( 32 )
Calculate
x ≈ 5
Check by substituting back
Put all the values back into the original formula: both sides should match.
32 = 2 5 ✓
Example 3: compound growth How many years does it take money to double at 5% compound interest? Solve 1.0 5 x = 2 .
Try this in the solver: a=1.05, b=2
Solving a^x = b Answer checked
Answer
x ≈ 14.21 x\approx 14.21 x ≈ 14.21 The formula
Solving a^x = b. In this formula b is the the result, a is the the base, x is the the unknown power.
b = a x
What we know and what we want
We know b = 2 , a = 1.05 and we want to find x , the the unknown power.
Rearrange for x
Take logs of both sides, then divide by log a.
x = log ( a ) log ( b )
Substitute the numbers
x = log ( 1.05 ) log ( 2 )
Calculate
x ≈ 14.21
Check by substituting back
Put all the values back into the original formula: both sides should match.
2 = 1.0 5 14.21 ✓
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.
Take logs x log 3 = log 20 Divide x = 1.3010 ÷ 0.4771 Calculate x = 2.73 Check: 3^2.73 is about 20 ✓ x = 2.73.
An integer power Solve 2ˣ = 32.
Take logs x = log 32 ÷ log 2 Calculate x = 5 Check: 2⁵ = 32 ✓ x = 5.
Doubling time Higher Money grows at 5% a year. How many years to double? Give 2 decimal places.
Equation 1.05ˣ = 2 Solve x = log 2 ÷ log 1.05 Calculate x = 14.21 Check: 1.05^14.21 is about 2 ✓ About 14.21 years.
Another base Higher Solve 5ˣ = 100 to 2 decimal places.
Take logs x = log 100 ÷ log 5 Calculate x = 2 ÷ 0.6990 = 2.86 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
x = log b ÷ log a.
Any base of log works.
Do not divide b by a.
Check by raising the base.
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.
Foundation Higher Mixed New question
Solve: …
The practice generator needs JavaScript.
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.