so I have the interest equation
$$P=C(1+\frac rn)^{nt}$$
and I need to solve for t. So what I did was divide to get rid of C first:
$$\frac PC=(1+\frac rn)^{nt}$$
then I took the logarithm to get nt on it's own
$$\log_{1+\frac rn}\frac PC = nt$$
divide by n...
$$\frac {\log_{1+\frac rn}\frac PC}n = t$$
Then the change of base to natural logs
$$t=\frac {\ln (\frac PC)}{n\ln (1+\frac rn)}$$
I was curious because Wolfram Alpha gave me a different answer so I wasn't sure if there's something I'm doing wrong that I should fix in the way I do algebra. I'm taking calculus next year so it's important that I do things correctly.