  We establish optimal error bounds on time-splitting methods for the nonlinear
Schr\"odinger equation with low regularity potential and typical power-type
nonlinearity $ f(\rho) = \rho^\sigma $, where $ \rho:=|\psi|^2 $ is the density
with $ \psi $ the wave function and $ \sigma > 0 $ the exponent of the
nonlinearity. For the first-order Lie-Trotter time-splitting method, optimal $
L^2 $-norm error bound is proved for $L^\infty$-potential and $ \sigma > 0 $,
and optimal $H^1$-norm error bound is obtained for $ W^{1, 4} $-potential and $
\sigma \geq 1/2 $. For the second-order Strang time-splitting method, optimal $
L^2 $-norm error bound is established for $H^2$-potential and $ \sigma \geq 1
$, and optimal $H^1$-norm error bound is proved for $H^3$-potential and $
\sigma \geq 3/2 $ (or $\sigma = 1$). Compared to those error estimates of
time-splitting methods in the literature, our optimal error bounds either
improve the convergence rates under the same regularity assumptions or
significantly relax the regularity requirements on potential and nonlinearity
for optimal convergence orders. A key ingredient in our proof is to adopt a new
technique called \textit{regularity compensation oscillation} (RCO), where low
frequency modes are analyzed by phase cancellation, and high frequency modes
are estimated by regularity of the solution. Extensive numerical results are
reported to confirm our error estimates and to demonstrate that they are sharp.
