Algorithms are proposed for the numerical inversion of the analytical solutions obtained through classical transform methods. We compute steady-state probabilities and moments of the number of customers in the system (or in the queue) at three different epochs—postdeparture, random, and prearrival—for models of the type M/GY/1, where the capacity of the single server is a random variable. This implies first finding roots of the characteristic equation, which is detailed in an appendix for a general service time distribution. Numerical results, given a service time distribution, are illustrated through graphs and tables for cases covered in this study: deterministic, Erlang, hyperexponential, and uniform distributions. In all cases, the proposed method is computationally efficient and accurate, even for high values of the queueing parameters. The procedure is adaptable to other models in queueing theory (especially bulk queues), to problems in inventory control, transportation, flexible manufacturing process, etc. Exact results that can be obtained from the algorithms presented here will be found useful to test inequalities, bounds, or approximations.