Well, there lies the problem. There is no "calculation". Basically there are two completely different types of Dynoes. One is with nothing but the engine on a stand and no other drive train components.
The other reads the HP at the rear wheels on a chassis dyno (where the entire car sits on the dyno). IMO the chassis dyno is where it's at. This tells you how efficiently and effectively your car is set up.
You could have a 1000hp engine but then drop it into a car that can't handle the HP and can not put those ponies to the rearend for squat. Kinda like the old saying, "where the rubber meets the road".
That's why typically they say whatever an engine can pull on the stand, deduct 15-30% for drivetrain loss etc. In the ones I've seen in person, it's usually the 30% figure that is most accurate...