A variational calculation of the vacuum energy of a Hamiltonian lattice theory is formulated in terms of a finite box Hamiltonian for a cluster of points. The box Hamiltonian contains surface terms which are proportional to order parameters of the system. It is tested on the Ising model and applied to Z(N) spin models in 1 + 1 and 2 + 1 dimensions. Z(3) is found to have an exceptional phase-transition structure. The application of the method to local gauge theories is discussed.