Calculate the cross ratio of four points A, B, C and D on a line from their coordinates, with the swapped-order values shown alongside the result.

Enter positions along one line in the same units. Point order changes the result.

Optional settings

Cross Ratio Formula

The following formula is used to calculate the Cross Ratio. 

CR = ((A - C) × (B - D)) / ((A - D) × (B - C))
  • Where CR is the Cross Ratio
  • AC denotes the signed difference A-C 
  • BD denotes the signed difference B-D 
  • BC denotes the signed difference B-C 
  • AD denotes the signed difference A-D

How to Calculate Cross Ratio?

For four distinct collinear coordinates A=0, B=1, C=2 and D=3, CR = ((0−2)(1−3))/((0−3)(1−2)) = 4/3 ≈ 1.3333333333.

Changing the order to A=0, B=2, C=1 and D=3 gives CR = ((0−1)(2−3))/((0−3)(2−1)) = −1/3. Signed differences matter; arbitrary positive segment lengths do not necessarily describe four collinear points.

A=D or B=C makes the denominator zero. Other repeated points can give finite algebraic values such as 0 or 1, but are degenerate configurations. For distinct points, the cross ratio is preserved under a nondegenerate projective transformation where the coordinates are defined.