We give a Pfaffian formula to compute the partition function of the Ising model on any graph G embedded in a closed, possibly non-orientable surface. This formula, which is suitable for computational purposes, is based on the relation between the Ising model on G and the dimer model on its terminal graph G T . By combining the ideas of Loebl-Masbaum [14], Tesler [18], Cimasoni [2, 3] and Chelkak-Cimasoni-Kassel [1], we give an elementary proof for the formula.2010 Mathematics Subject Classification. Primary 82B20; Secondary 05C70, 05C10, 57M15.