  In some insulators, corner charges are fractionally quantized, due to the
topological invariant called a filling anomaly. The previous theories of
fractional corner charges have been mostly limited to two-dimensional systems.
In three dimensions, only limited cases have been studied. In this study, we
derive formulas for the filling anomaly and the corner charge in various
crystals with all the tetrahedral and cubic space groups. We discuss that the
quantized corner charge requires the crystal shapes to be vertex-transitive
polyhedra. We show that the formula of the filling anomaly is universally given
by the difference between electronic and ionic charges at the Wyckoff position
1a. The fractional corner charges appear by equally distributing the filling
anomaly to all the corners of the crystal. We also derive the k-space formulas
for the fractional corner charge. In some cases, the corner charge is not
determined solely from the irreps at high-symmetry k-points. In such cases, we
introduce a new Z2 topological invariant to determine the corner charge.
