Achieving an accurate working distance in gradient index (GRIN) rod lens–based miniaturized imaging probes is critical for the successful implementation of imaging systems in various biophotonic applications. Although numerous commercial optical design software tools are available for such designs and simulations, they are often too expensive for typical research laboratories and require substantial time and effort for beginners to learn and use effectively. In this paper, we present a simple yet practically useful MATLAB-based simulation code and an underlying ray tracing model. Our approach is based on the principle that the trajectory of an optical ray entering a GRIN lens medium is deterministically defined by the boundary conditions at the entrance surface. We evaluated the accuracy of the developed model using a typical optical fiber and GRIN lens configuration commonly employed in miniaturized imaging probes. Notably, for the assumed probe configuration where a paraxial approximation is valid, the predicted working distances closely matched the results obtained from commercial software. Given that many laboratories lacking access to specialized software have had to rely solely on manufacturer feedback to determine the specifications of a GRIN lens—often at the cost of considerable time—this model could serve as a valuable alternative to facilitate progress in related research.