We present results of $\mathbit{k}\ifmmode\cdot\else\textperiodcentered\fi{}\mathbit{p}$ calculations of the effective $g$ factor of holes confined in spherical, cube, and planar semiconductor nanocrystals (NCs). We use the six-band Luttinger model for semiconductors with the zinc-blende crystal structure and study the size dependence of the ${\mathrm{\ensuremath{\Gamma}}}_{8}$ top valence subband hole $g$ factor caused by the admixture of the spin-orbit split-off valence subband ${\mathrm{\ensuremath{\Gamma}}}_{7}$. We present semianalytical expressions for the hole $g$ factor which depends on the light- to heavy-hole effective mass ratio $\ensuremath{\beta}$ and on the ratio between spin-orbit energy splitting of valence band ${\mathrm{\ensuremath{\Delta}}}_{\text{SO}}$ and the hole quantization energy ${E}_{h}$. The admixture of ${\mathrm{\ensuremath{\Gamma}}}_{7}$ states is significant for small ${\mathrm{\ensuremath{\Delta}}}_{\text{SO}}/{E}_{h}$ and, in spherical and cube NCs, leads to a strong size dependence of the hole $g$ factor. In thin planar nanoplatelets (NPLs) with infinite or large lateral sizes, the dependence of the heavy-hole $g$ factor on NPL thickness is relatively weak. It is drastically enhanced and may become nonmonotonic in NPLs with finite in-plane sizes due to the additional hole states mixing. We discuss our results in comparison with published experimental data for CdSe- and InP-based spherical NCs and NPLs and point out the specificity of extracting hole $g$ factor from the data measured on excitons.