  A new and efficient algorithm is presented for the calculation of the
partition function in the $S=\pm 1$ Ising model. As an example, we use the
algorithm to obtain the thermal dependence of the magnetic spin susceptibility
of an Ising antiferromagnet for a $8\times 8$ square lattice with open boundary
conditions. The results agree qualitatively with the prediction of the Monte
Carlo simulations and with experimental data and they are better than the mean
field approach results. For the $8\times 8$ lattice, the algorithm reduces the
computation time by nine orders of magnitude.
