Segregation of polydisperse granular materials occurs in many natural and industrial settings, but general theoretical modelling approaches with predictive power have been lacking. Here we describe a model capable of accurately predicting segregation for both discrete and continuous particle size distributions based on a generalized expression for the percolation velocity. The predictions of the model depend on the kinematics of the flow and other physical parameters such as the diffusion coefficient and the percolation length scale, quantities that can be determined directly from experiment, simulation or theory and that are not arbitrarily adjustable. The model is applied to heap and chute flow, and the resulting predictions are consistent with experimentally validated discrete element method (DEM) simulations. Several different continuous particle size distributions are considered to demonstrate the broad applicability of the approach.