Pellet energy

That’s a deep rabbit hole. But just on the surface level, the mass of the air released by the valve nears that of the projectile so there goes a big chunk of the potential energy.

It’s somewhat like the rocket problem. It takes a whole lot of fuel to get up into the atmosphere, which in turns requires a lot of fuel, which in turn makes the rocket heavier, which requires more fuel...
 
If you want to dig into this, the book "The Airgun from Trigger to Target" goes over it. It's way more information than I could regurgitate here, which is also to confirm what nervoustrig said - there's not a simple answer, and certainly no universal formula. Due to inefficiencies caused by your transfer port, friction in any springs (piston or valve), and fit and friction of your barrel and pellet, etc, there's no way to create a good formula unless you could quantify all of those things. BUT, you can (still with some potential difficulty) calculate how much energy you are putting into the system, and measure (chronograph & pellet weight) the energy out, empirically arriving at a quantity of energy required (efficiency).

HTH,

GsT
 
(Velocity Squared x Grains) / 450240 = Foot Pounds of energy where the velocity was read.

*Interesting note: At 671 fps the Grains of a projectile = the foot pounds of energy.

The 450240 will get you close but was arrived at using an erroneous conversion.

Kinetic energy equation: 1/2 x mass x v^2 = fpe, where mass is in slugs and velocity is in feet/second

(Velocity Squared x Grains) / 450437. Or use 450436.68 if you want an even more exact number.

In the imperial system, slugs are used directly as the unit of mass in kinetic energy calculations. So if you first convert the grains to slugs, you can then solve the kinetic energy equation directly.

https://www.google.com/search?q=slugs+to+grains

*Interesting note: At 1 fps, a 2 slug projectile (450437 grains) = 1 foot pound of energy.


 
I think what the question is getting after is a basic rule of thumb - for example - the amount of energy used in the shot cycle of a PcP (ie volume of air used per shot) might be approximately twice the amount of energy the pellet has at the muzzle (I haven’t calculated it, I’m just giving a an example of a rule that might be found). If you had a basic computation - something like that - then you could figure out a lot of general information about your gun without having to shoot and record dozens or hundreds of shots to get the raw data to calculate it by hand. So, has anyone done the math as GeneT is suggesting? Doing it on any gun would at least give you a starting point. Might not match the next gun exactly but it seems to me that if you did it on a few guns there would start to be a general pattern / general rule that would develop.