We investigate the transition temperature of layered superconductors by considering a stack of Lz superconducting layers, separated by insulating material. We adopt a pairing Hamiltonian, invoke the variational principle and solve the resulting gap equations numerically. Our results confirm previous weak coupling and Ginzburg-Landau treatments and reveal a rise of Tc with Lz and saturation at the bulk transition temperature. Thus, the rise of Tc is traced back to a finite size effect, corresponding to a crossover from 2-d to 3-d superconductivity. The results also reveal a sizeable variation of the gap along the stack with pronounced variation at the ends. © 1991 Springer-Verlag.