  We calculate the lifetime of the deuteron with dimension-nine quark operators
that violate baryon number by two units. We construct an effective field theory
for $|\Delta B|=2$ interactions that give rise to neutron-antineutron
($n$-$\bar{n}$) oscillations and dinucleon decay within a consistent power
counting. We calculate the ratio of the deuteron lifetime to the square of the
$n$-$\bar{n}$ oscillation time up to next-to-leading order. Our result, which
is analytical and has a quantified uncertainty, is smaller by a factor $\simeq
2.5$ than earlier estimates based on nuclear models, which impacts the indirect
bound on he $n$-$\bar{n}$ oscillation time and future experiments. We discuss
how combined measurements of $n$-$\bar{n}$ oscillations and deuteron decay can
help to identify the sources of baryon-number violation.
