Displacement + combustion chamber CC's divided by combustion chamber CC's = compression ratio.
Combustion chamber CC's = head CC's + gasket hole CC's + piston in the hole CC's.
Convert cubic inches to cubic centimeters, (CC's) multiply cubic inches by 16.387064
Calculate cubic inches; (3.1415 X (radius divided by 2)) X stroke, (or thickness) in inches.
Give me the bore and stroke of your engine and I'll calculated it for you if you have any trouble understanding this math.