We directly calculate fully nonlinear traveling waves that are periodic in two independent horizontal directions (biperiodic) in shallow water. Based on the Riemann theta function, we also calculate exact periodic solutions to the Kadomtsev–Petviashvili (KP) equation, which can be obtained by assuming weakly-nonlinear, weakly-dispersive, weakly-two-dimensional waves. To clarify how the accuracy of the biperiodic KP solution is affected when some of the KP approximations are not satisfied, we compare the fully- and weakly-nonlinear periodic traveling waves of various wave amplitudes, wave depths, and interaction angles. As the interaction angle θ decreases, the wave frequency and the maximum wave height of the biperiodic KP solution both increase, and the central peak sharpens and grows beyond the height of the corresponding direct numerical solutions, indicating that the biperiodic KP solution cannot qualitatively model direct numerical solutions for . To remedy the weak two-dimensionality approximation, we apply the correction of Yeh et al (2010 Eur. Phys. J. Spec. Top. 185 97–111) to the biperiodic KP solution, which substantially improves the solution accuracy and results in wave profiles that are indistinguishable from most other cases.