# Excel formula to calculate power of [closed]

Given the following equation: 2^X - 2 = N

I'd like to solve for X. N is known.

What function could I use in Excel to do this?

-

## closed as too localized by Mike Fitzpatrick, Indrek, Canadian Luke, Diogo, SynetechOct 12 '12 at 1:32

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Is that supposed to be 2^(X-2)= N or (2^X) - 2 = N? – tarheel Oct 11 '12 at 16:37

`=(log(A1+2)/log(2))` where A1 is the source cell.

-

X = log(N+2)/log(2)

log is an excel function, the rest is more about solving an equation.

-
That makes sense. Thank you. – mheathershaw Oct 11 '12 at 16:39

Put X in a cell and use the goal seek function, e.g.:

• in A1, enter a value of X, e.g. 1
• in A2, enter the formula `=2^A1-2`
• Data Menu \ What If analysis \ Goal Seek
• Set cell A2 to value N by changing cell A1
-