  We present a general approach for proving the optimality of the exponents on
weighted estimates. We show that if an operator $T$ satisfies a bound like $$
\|T\|_{L^{p}(w)}\le c\, [w]^{\beta}_{A_p} \qquad w \in A_{p}, $$ then the
optimal lower bound for $\beta$ is closely related to the asymptotic behaviour
of the unweighted $L^p$ norm $\|T\|_{L^p(\mathbb{R}^n)}$ as $p$ goes to 1 and
$+\infty$, which is related to Yano's classical extrapolation theorem. By
combining these results with the known weighted inequalities, we derive the
sharpness of the exponents, without building any specific example, for a wide
class of operators including maximal-type, Calder\'on--Zygmund and fractional
operators. In particular, we obtain a lower bound for the best possible
exponent for Bochner-Riesz multipliers. We also present a new result concerning
a continuum family of maximal operators on the scale of logarithmic Orlicz
functions. Further, our method allows to consider in a unified way maximal
operators defined over very general Muckenhoupt bases.
