.Ray data files are a common way to model light sources, such as light emitting diodes (LEDs), in optical design software. Often, when an LED shall be placed at the focal point of a collimating lens, it is desirable to know the coordinates of just a single point, which is representative of the light source location, similar to the center of mass for a distribution of matter. In some communities, this point is known as the “virtual focus,” and some LED vendors publish the virtual focus coordinates with their ray data sources. However, it is hard to find a clear and precise definition of the virtual focus, and it is not clear how it can be computed in an efficient way. We explain our definition and provide an efficient algorithm and its MATLAB® implementation.