We consider the five-vertex model on a finite square lattice with fixed boundary conditions such that the configurations of the model are in a one-to-one correspondence with the boxed plane partitions (3D Young diagrams which fit into a box of given size). The partition function of an inhomogeneous model is given in terms of a determinant. For the homogeneous model, it can be given in terms of a Hankel determinant. We also show that in the homogeneous case the partition function is a τ-function of the sixth Painlevé equation with respect to the rapidity variable of the weights.