The identification of mean motion resonances in exoplanetary systems or in the Solar System might be cumbersome when several planets and large number of smaller bodies are to be considered. Based on the geometrical meaning of the resonance variable, an efficient method is introduced and described here, by which mean motion resonances can be easily find without any a priori knowledge on them. The efficiency of this method is clearly demonstrated by using known exoplanets engaged in mean motion resonances, and also some members of different families of asteroids and Kuiper-belt objects being in mean motion resonances with Jupiter and Neptune respectively.