One option to estimate wave drag except for other drag components in CFD is "drag decomposition". (http://arc.aiaa.org/doi/abs/10.2514/2.7300?journalCode=aiaaj) In this method, whole domain is decomposed by using some sensors such as shock sensor or viscosity sensor.
The formula can be obtained from linearised supersonic flow theory, available in Anderson (Fundamentals of Aerodynamics), as has previously been posted: