This paper deals with the algorithm for computing outer inverse with prescribed range and null space, based on the choice of an appropriate matrix G and Gauss–Jordan elimination of the augmented matrix [G|I]. The advantage of such algorithms is the fact that one can compute various generalized inverses using the same procedure, for different input matrices. In particular, we derive representations of the Moore–Penrose inverse, the weighted Moore–Penrose inverse, the Drazin inverse as well as {2,4} and {2,3}-inverses. Numerical examples on different test matrices are presented, as well as the comparison with well–known methods for generalized inverses computation.