Because I'm a 2 stroke guy I will be focused on 2 strokes and specifically on the KX500.
Put simply, BMEP is a measurement of the average Pressure exerted on the piston.
Here is a simple formula.
BMEP = 150.8 x Torque in ft/lb / CID
If you know the variables, just plug them in and run the math.
But you need the variables.
I've done a lot of dyno work testing various pipes and reeds so I will use those numbers for examples.
Unfortunately, my numbers are all measured at the rear wheel and not at the crank so I cant filter out the parasitic loss we get through the drive train

Here is one sites claim for KX500 output
Max Power 66 hp / @ 7000 rpm
Max Torque 48.4 lb-ft / @ 6000 rpm
On a fresh KX500 2001 KX500 I measured
Max Power 53.11 hp @ 6520 rpm
Max Torque 44.23 lb-ft / @ 6140 rpm