  Let $\mathcal M$ be the uncentered Hardy-Littlewood maximal operator or the
dyadic maximal operator and $d\geq1$. We prove that for a set $E\subset\mathbb
R^d$ of finite perimeter the bound $\operatorname{var}\mathcal M1_E\leq
C_d\operatorname{var}1_E$ holds. We also prove this for the local maximal
operator.
