This paper deals with the Ekman rule, which is a well-known method for univariate stratification that approximately minimises the variance of the ordinary expansion estimator. An efficient numerical algorithm for the Ekman rule is presented.