The k-flex locus of a projective hypersurface \(V\subset \mathbb {P}^n\) is the locus of points \(p\in V\) such that there is a line with contact order at least k with V at p. Unexpected contact orders occur when \(k\ge n+1\) . The case \(k=n+1\) is known as the classical flex locus, which has been studied in details in the literature. This paper is dedicated to computing the dimension and the degree of the k-flex locus of a general degree d hypersurface for any value of k. As a corollary, we compute the dimension and the degree of the biggest ruled subvariety of a general hypersurface. We show moreover that through a generic k-flex point, there passes a unique k-flex line which has contact order exactly k if \(k\le d\) . The proof is based on the computation of the top Chern class of a certain vector bundle of relative principal parts, inspired by and generalizing a work of Eisenbud and Harris.