In this article, we investigate the lump solutions for the Kadomtsev-Petviashvili equation in (3 + 1) dimensions that describe the dynamics of plasmas or fluids. Via the symbolic computation, lump solutions for the (3 + 1)-dimensional Kadomtsev-Petviashvili equation are derived based on the bilinear forms. The conditions to guarantee analyticity and rational localisation of the lump solutions are presented. The lump solutions contain eight parameters, two of which are totally free, and the other six of which need to satisfy the presented conditions. Plots with particular choices of the involved parameters are made to show the lump solutions and their energy distributions.