  In this paper, we propose a generalization of the $S$-duality of
four-dimensional quantum electrodynamics ($\text{QED}_4$) to $\text{QED}_4$
with fractionally charged excitations, the fractional $S$-duality. Such
$\text{QED}_4$ can be obtained by gauging the $\text{U(1)}$ symmetry of a
topologically ordered state with fractional charges. When time-reversal
symmetry is imposed, the axion angle ($\theta$) can take a nontrivial but still
time-reversal invariant value $\pi/t^2$ ($t\in\mathbb{Z}$). Here, $1/t$
specifies the minimal electric charge carried by bulk excitations. Such states
with time-reversal and $\text{U(1)}$ global symmetry (fermion number
conservation) are fractional topological insulators (FTI). We propose a
topological quantum field theory description, which microscopically justifies
the fractional $S$-duality. Then, we consider stacking operations (i.e., a
direct sum of Hamiltonians) among FTIs. We find that there are two
topologically distinct classes of FTIs: type-I and type-II. Type-I
($t\in\mathbb{Z}_{\rm odd}$) can be obtained by directly stacking a
non-interacting topological insulator and a fractionalized gapped fermionic
state with minimal charge $1/t$ and vanishing $\theta$. But type-II
($t\in\mathbb{Z}_{\rm even}$) cannot be realized through any stacking. Finally,
we study the Surface Topological Order of fractional topological insulators.
