  Anomalous X-ray pulsars and soft gamma repeaters are slowly rotating, young,
and isolated neutron stars exhibiting sporadic outbursts and high X-ray
quiescent luminosities. They are believed to be powered by ultrastrong magnetic
fields, $B\sim10^{14}-10^{15}$ G, associated with `magnetars'. In the peculiar
case of SGR 0418+5729, timing parameters imply a dipolar $B$-field of
$6.1\times10^{12}$ G. This discovery has challenged the traditional picture of
magnetars in terms of $B$-field strengths, evolutionary stages, and ages. Here
we provide a novel approach to estimate a magnetar's age by considering the
self-consistent time evolution of a plasma-filled oblique pulsar with the
state-of-the-art magnetospheric particle acceleration gaps. The rotational
period of magnetars increases over time due to angular momentum extraction by
gravitational-wave radiations, magnetic dipole radiations, and particle winds.
These torques also change the obliquity angle between the magnetic and rotation
axes. For SGR 0418+5729, we obtain a dipolar $B$-field of $1.0\times10^{14}$ G,
and a realistic age of $\sim18$ kyr, consistent within the magnetar paradigm.
