We use density functional theory calculations to compute the lateral strain dependence of the magnetocrystalline anisotropy (MCA) energy of thin FeCo films. We investigate the effect of lateral strain on the MCA energy especially in the context of magnetostriction, which needs to be minimized for some applications like GMR sensors. The magneto-elastic coupling responsible for magnetostriction is a strain-derivative of the MCA energy, thus we concentrate to find extrema in the MCA energy vs. strain curves, which we find for both ordered Fe50Co50 films, as well as for disordered Fe10Co90 films modeled by special quasirandom structures. We show that using lateral strain we can switch the easy axis of magnetization from out-of-plane to in-plane in many cases. We can furthermore use lateral strain in combination with the film-thickness to minimize magnetostriction and change the MCA energy at the same time.