When high speed trains travel close to the wave propagation velocity of the supporting track-ground system, large amplitude track deflections are generated. This has safety implications, and also results in a significant increase in track maintenance due to subgrade deterioration. Thus, this paper presents a method to rapidly predict the speed at which these 'critical velocity' effects occur. The method is based upon a dispersion analysis of both the track (either ballast or non-ballasted/slab track) and the underlying ground, which are treated as uncoupled systems. Unlike previous approaches, the new calculation approach is fully automated thus not requiring any post-processing to extract the soil dispersion curve. It also works for soil layers of arbitrary depth, uses minimal computing power and can calculate critical speeds associated with higher soil modes. The dispersion based method can be deployed on new/existing lines via a drop-weight test, or using existing geotechnical data. Its accuracy is tested by comparing the results against an alternative semi-analytical, quasi-static railtrack model, and found to be 97% accurate. The code is useful for railway track infrastructure design and its short run times mean it can be used as a scoping tool for newly proposed high speed railroad lines. To obtain new insights into the key variables effecting critical velocity, a sensitivity analysis is undertaken using 1000 random soil profiles. It is found that on average, for the same track height, slab tracks are less likely to encounter critical velocity issues than ballasted tracks because their critical speed is typically 11% higher. It is also shown that track height plays an important role with increases in slab track thickness and reductions in ballasted track thickness both causing increases in critical velocity. Furthermore, it is found that soil saturation affects critical speed considerably (by up to 12-17% depending on track type) because changes to Poisson's ratio alter the dispersion characteristics of layered soils in the mid-frequency range, where critical velocity effects occur. Finally, it is shown that railpad stiffness has a low influence, and that increasing the rail bending stiffness on ballasted tracks increases critical speed.