In this paper we define a new linearity measure for open curve segments in 2D and 3D. The measure considers the distance of the curve end points to the curve centroid. It is simple to compute and has the basic properties that should be satisfied by any linearity measure. The new measure ranges over the interval (0, 1], and produces the value 1 if and only if the measured curve is a perfect straight line segment. Also, the new linearity measure is invariant with respect to translations, rotations and scaling transformations. The new measure is theoretically well founded and, because of this, its behaviour can be well understood and predicted to some extent. This is always beneficial because it indicates the suitability of the new measure to the desired application.Several experiments are provided to illustrate the behaviour and to demonstrate the efficiency and applicability of the new linearity measure.