How are IAS to CAS conversions calculated?
There are instrument errors in the airspeed indicator system, which consists, but is not limited to the air speed indicator, a pitot port (which senses ram air pressure) and a static port (provides ambient air pressure for airspeed and for altimeter and VSI instruments).

Because there are errors in the indicated airspeed, each manufacturer is required to measure airspeed and then provides data of indicated vs calibrated airspeed data.  This used to be a much bigger deal when flights were conducted by dead reckoning, and reliable airspeeds were more directly beneficial to the flight planning and enroute process.  

Today, other instruments provide more accurate effective ground speed data.  For example, a low cost GPS can have greater accuracy in measuring effective ground speed than radar, and rivals lidar systems costing much more money.

Nevertheless, manufacturers still provide CAS / IAS tables.

Oh the instruments used to determining CAS?  Often supplemental pitot probes, which are on extended booms in front of the aircraft. 

To a lesser degree GPS/IMU, radar and lidar may play a role in some testing, but these instruments do not actually measure airspeed, where as an extended boom pitot will measure ram air pressure, ideally outside any airframe and power plant perturbations.

Finally, a pilot may translate, using manufacturer provided CAS / IAS conversion tables, IAS to CAS when CAS figures are needed.  But CAS figures are not calculated, they are empirical.