The magnetic anisotropy energy of Cu(100)/Ni/Co-m, 0 less than or equal to m less than or equal to 5, is calculated using the spin-polarized fully relativistic screened Korringa-Kohn-Rostoker method for layered systems. The Ni film was divided into two regions, one consisting of Ni layers epitaxially grown on Cu(100) and tetragonally relaxed with a c/a ratio of 0.945 and, subsequently a transient region subject of strain relaxation, the other one consisting of Ni layers corresponding to a fee Ni parent lattice. For both regions, separate calculations were performed and then combined with each other on the basis of an analysis of layer decomposed contributions to the anisotropy energy. By varying the thickness of both regions the critical (total) thickness for the reorientation transition of the magnetization from perpendicular to in-plane is determined. Capping the Ni film with Co is found to show an unexpected behavior: the number of Ni layers, at which the reorientation occurs, is first increased until 2 ML of Co are added and then decreases rapidly with the addition of more Co layers. This feature is mainly attributed to changes in the band part of the anisotropy energy induced by the Ni/Co interface as seen in terms of layer-resolved contributions.