We give a bound on the Castelnuovo–Mumford regularity of a homogeneous ideal I, in a polynomial ring A, in terms of the number of variables and the degrees of generators, when the dimension of A / I is at most two. This bound improves the one obtained by Caviglia and Sbarra in [G. Caviglia, E. Sbarra, Characteristic-free bounds for the Castelnuovo–Mumford regularity, Prépublication, math.AC/0310122]. In the continuation of the examples constructed in Chardin and D'Cruz [M. Chardin, C. D'Cruz, Castelnuovo–Mumford regularity: examples of curves and surface, J. Algebra 270 (2003) 347–360], we use families of monomial curves to construct homogeneous ideals showing that these bounds are quite sharp. To cite this article: M. Chardin, A.L. Fall, C. R. Acad. Sci. Paris, Ser. I 341 (2005).