Here, p, q, r and s are the sides of the quadrilateral, T is half the perimeter, and A and C are two opposite angles.
Bretschneider's formula works on any quadrilateral regardless of whether it is cyclic or not.
Proof of Bretschneider's formula
Denote the area of the quadrilateral by S. Then we have
The cosine law implies that
because both sides equal the square of the length of the diagonal BD. This can be rewritten as
Substituting this in the above formula for yields
This can be written as
Introducing the semiperimeter
the above becomes
and Bretschneider's formula follows.