Convert from base $10$ to base $5$ I am having a problem converting $727$(base $10$) to base $5$. What is the algorithm to do it?
I am getting the same number when doing so: $7\times 10^2 + 2\times10^1+7\times10^0 = 727$, nothing changes.
Help me figure it out!

You have to divide each number by 5 :
$$\begin{aligned}
727 &= 5 \cdot 145 &+ \color{red}{2}\\
145 &= 5 \cdot 29 &+ \color{green}{0}\\
29 &= 5 \cdot 5 &+ \color{blue}{4}\\
5 &= 5 \cdot 1 &+ \color{magenta}{0}\\
1 &= 5 \cdot 0 &+ \color{brown}{1}
\end{aligned}
$$
Hence the answer is $\color{brown}{1}\color{magenta}{0}\color{blue}{4}\color{green}{0}\color{red}{2}_5 = 1 \cdot 5^4 + 0 \cdot 5^3 + 4 \cdot 5^2 + 0 \cdot 5^1 + 2 \cdot 5^0 = 727$
