If $b$ is the base ("multiplier", $2.5$ in the example) and $x$ is the number to be tested, the next power of $b$ is
$$b^{\left\lfloor\log_b x\right\rfloor+1}$$
where $\log_b x$ is the logarithm to base $b$ and $\lfloor x\rfloor$ is the floor function.
If you don't have access to arbitrary logarithms, use
$$\log_b x = \frac{\log x}{\log b}$$
where the logarithm on the right can be whatever logarithm is available to you — typically either the natural logarithm, or the base 10 logarithm —, but it must be the same for the numerator and denominator.
Edit note: I corrected the formula after I noticed that when your number already is a power of the given base, you want the next one. The pre-edit formula would have given the same power for this case (so for example, $6.25$ would have resulted in $6.25$ with the old formula, but gives $15.625$ with the corrected one. Note that for any other numbers, both give the same result.