The polarizability of the hydrogen molecule is calculated theoretically The energy of the molecule, under an external electrostatic field, is calculated by the variation method, using 11+10 terms and 11+9 terms James-Coolidge type wave functions, for the polarizability parallel to and perpendicular to the molecular axis respectively. By expanding the energy in powers of the field strength, the polarizability is determined. By using a Morse function for the adiabatic potential of the molecule, the 0-0 and 0-1 matrix elements of the polarizability between vibrational states are calculated, with the result: α00=7.89, γ00=2.78, α01=1.39, γ01=0.90 for ordinary hydrogen H2, and α00=7.75, γ00=2.68, α01=1.13, γ01=0.71 for heavy hydrogen D2 (in units of 10-25 cm3), where α is the mean polarizability and γ the anisotropy.