A saturation–capillary pressure relationship is proposed that is applicable for all wettabilities, including mixed-wet and oil-wet or hydrophobic media. This formulation is more flexible than existing correlations that only match water-wet data, while also allowing saturation to be written as a closed-form function of capillary pressure: we can determine capillary pressure explicitly from saturation, and vice versa. We propose $$P_{{\text{c}}} = A + B\tan \left( {\frac{\pi }{2} - \pi S_{e}^{C} } \right)\,{\text{for}}\,0 \le S_{{\text{e}}} \le 1,$$
P
c
=
A
+
B
tan
π
2
-
π
S
e
C
for
0
≤
S
e
≤
1
,
where $$S_{{\text{e}}}$$
S
e
is the normalized saturation. A indicates the wettability: $$A>0$$
A
>
0
is a water-wet medium, $$A<0$$
A
<
0
is hydrophobic while small A suggests mixed wettability. B represents the average curvature and pore-size distribution which can be much lower in mixed-wet compared to water-wet media with the same pore structure if the menisci are approximately minimal surfaces. C is an exponent that controls the inflection point in the capillary pressure and the asymptotic behaviour near end points. We match the model accurately to 29 datasets in the literature for water-wet, mixed-wet and hydrophobic media, including rocks, soils, bead and sand packs and fibrous materials with over four orders of magnitude difference in permeability and porosities from 20% to nearly 90%. We apply Leverett J-function scaling to make the expression for capillary pressure dimensionless and discuss the behaviour of analytical solutions for spontaneous imbibition.