  We present the first full analytic results of next-to-next-to-leading order
(NNLO) QCD corrections to the top-quark decay width $\Gamma(t\to Wb)$ by
calculating the imaginary part of three-loop top-quark self-energy diagrams.
The results are all expressed in terms of harmonic polylogarithms and valid in
the whole region $0\le m_W^2\le m_t^2$. The expansions in the $m_W^2\to 0$ and
$m_W^2\to m_t^2$ limits coincide with previous studies. Our results can also be
taken as the exact prediction for the lepton invariant mass spectrum in
semileptonic $b\to u$ decays. We also analytically compute the decay width
including the off-shell $W$ boson effect up to NNLO in QCD for the first time.
Combining these contributions with electroweak corrections and the finite
$b$-quark mass effect, we determine the most precise top-quark width to be
1.331 GeV for $m_t=172.69$ GeV. The total theoretical uncertainties including
those from renormalization scale choice, top-quark renormalization scheme,
input parameters, and missing higher-order corrections are scrutinized and
found to be less than $1\%$.
