How does it calculate it?
mass airflow sensor readings, throttle %, fuel rate, engine RPM, converter slip speed, turbine RPM, etc.
It factors in all of these and performs a bunch of complex calculations and can make a pretty good educated guess at how much torque the engine is actually putting out.
just like how if the TCM loses throttle % signal (obviously critical in determining shift points), it will actually default to an "educated guess" on what the throttle % is based on converter slip speed. Its pretty clever and actually fairly accurate at guessing (disconnect the high-speed databus wires going to the TCM and drive around, and you'll see how it can still shift and guestimate the proper shift points based on converter slip speed and vehicle speed alone)
Only the 2009+ A50 controller has this advanced "actual engine torque guestimating" feature in the software, but all Allison TCM's (both 5-speed and 6-speed) have the "default mode" in the software that allows it to still work properly if it loses all communications with the ECM and throttle % info.
But idk, tony says thats not how it works, so who knows the real answer...