There are many verables that determine Horse Power. You may have two identical engines that put out different horse power. It is determined by displacement, Compression Ratio, Fuel mixture, engine design, ignition and valve timing.
Horse Power or (BHP) 1BHP = 550 FtLb per second
Example: For Calculating FtLb
Work= Distance X Force (5Ft X 10Lb = 50FtLb)
Power= Work / Time (50FtLb / 2 seconds = 25 Foot Pounds per Second)
If you want to figure out CC for an engine you use
Displacement= Bore X Bore X 0.7854 X Stroke, X number of cylenders
Example 5.4(Bore) X 5.4(Bore) X 0.7854(Constant) X 5.4(Stroke) X 1(number of cylenders) = 123.672 CC
and if you need to convert CI to CC (1 CI = 16.387 CC)