Traditionally, steady-state relative permeability is calculated from measurements on small rock samples using Darcy’s law and assuming a homogenous saturation profile and constant capillary pressure. However, these assumptions are rarely correct as local inhomogeneities exist; furthermore, the wetting phase tends to be retained at the outlet–the so-called capillary end effect. We have introduced a new method that corrects the relative permeabilities, analytically, for an inhomogeneous saturation profile along the flow direction. The only data required are the measured pressure drops for different fractional flow values, an estimate of capillary pressure, and the saturation profiles. An optimization routine is applied to find the range of relative permeability values consistent with the uncertainty in the measured pressure. Assuming a homogenous saturation profile systematically underestimates the relative permeability and this effect is most marked for media where one of the phases is strongly wetting with a noticeable capillary end effect. Relative permeabilities from seven two-phase flow experiments in centimetre-scale samples with different wettability were corrected while reconciling some hitherto apparently contradictory results. We reproduce relative permeabilities of water-wet Bentheimer sandstone that are closer to other measurements in the literature on larger samples than the original analysis. Furthermore, we find that the water relative permeability during waterflooding a carbonate sample with a wide range of pore sizes can be high, due to good connectivity through the microporosity. For mixed-wet media with lower capillary pressure and less variable saturation profiles, the corrections are less significant.