# What is the formula of power of an optical instrument?

I have searched and found that the power of a lens, with surrounding medium of refractive index $n$, is $n/f$ where $f$ is the focal length, the formula is $$n/f=(n'-n)/R1 + (n-n')/R2.$$

But in my book it is said that the power of a lens is $1/f$. What's the actual formula?

The equation you are quoting gives the power of a lens in terms of its geometry and refractive index. Simply rearranging the terms (dividing by $n$) gives you an expression for $\frac{1}{f}$ which is known as the power of the lens and is expressed in diopters. For the usual situation of a lens in air, we can put $n=1$ which leaves you with an even simpler expression for $\frac{1}{f}$.
Dunno what book you're quoting, but you should realize that the index of refraction of air is $n = 1+ \epsilon$ (where I'm using the mathematics standard of $\epsilon$ being a tiny number). Thus the power in air is $1/F$