Objective: Propose a methodology to determine the number of medical students who can rotate, for the practice of medicine, in a university hospital, so that the quality of training processes and in-patient care are assured. Materials and Methods: A three-step procedure is presented, in order to find the number of students that the institution can accept simultaneously. Results: The method is based on an integer linear model and it was implemented to assess installed capacity of General Surgery service at Hospital Universitario Clínica San Rafael, increasing in two students (33 %) the training capacity. Conclusions: The proposed methodology not only guaranties the quality of training processes and in-patient care, but also generates other intangible results such as having a more agile way of planning, reducing the planification time. The methodology is easily extended to other services within hospitals.