Electric dipole polarizability from first principles calculations