The Stolarsky mean ([29], [30]) S a,b (x, y) of the numbers x, y > 0 with parameters a, b ∈ R is defined by S a,b (x, y) = b(x a − y a ) a(x b − y b ) 1 a−b if ab(a − b)(x − y) = 0, while for ab(a − b)(x − y) = 0 the function S a,b (x, y) is extended continuously. We study monotonicity properties of the ratio R a,b (x, y, z) := S a,b (x, y) S a,b (x, z) (a, b ∈ R, 0 < x < y < z) in the parameters a, b where 0 < x < y < z and completely solve the comparison problem R a,b (x, y, z) ≤ R c,d (x, y, z) (a, b, c, d ∈ R, 0 < x < y < z) for this ratio. This generalizes, among others, the results of C. E. M. Pearce and J. Pečarić [27] and F. Qi, Sh.-X. Chen and Ch.-P. Chen [9], [15].