We obtain new explicit formulas for the Bergman kernel function on two families of Hartogs domains. To do so, we first compute the Bergman kernels on the slices of these Hartogs domains with some coordinates fixed, evaluate these kernel functions at certain points off the diagonal, and then apply a first order differential operator to them. We find, for example, explicit formulas for the kernel function on
$$begin{aligned} left{ (z_1,z_2,w)in mathbb {C}^3:e^{|w|^2}|z_1|^2+|z_2|^2<1right} end{aligned}$$
and on
$$begin{aligned} left{ (z_1,z_2,w)in mathbb {C}^3:|z_1|^2+|z_2|^2+|w|^2<1+|z_2w|^2;mathrm{and} ;|w|<1right} . end{aligned}$$
We use our formulas to determine the boundary behavior of the kernel function of these domains on the diagonal.