Percent power is calculated using everything you would find on a standard Lycoming or Continental power chart. MAP, RPM, OAT, Altitude, and fuel flow are all used. It looks it up just like you would on the chart. These complex look ups all assume you are ROP. It's also critical that your EMS use things like altitude and OAT since they can change the % power by over 20%. A lot of EMS systems seem to think you can do it with just an RPM vs. MAP table, but look at any power chart and it's clear you can't ignore the air density effects.
The charts also have data for lean of peak operation, which is actually much easier. If you know you are LOP, % power is just fuel flow multiplied by a constant.
The real trick is figuring out if you are ROP or LOP automatically, since the number you calculate will be totally wrong if you use the ROP chart when you are LOP. How we do that is not something we can share since we're the only ones that do it.