To work out compression ratio accurately you will need to know several things:
Bore diameter
Total piston stroke
Head gasket diameter
Head gasket compressed thickness
Piston deck height (amount piston is in the hole) Piston dome cc (if using a domed piston) And also head cc
There is a couple of calculators online which can be very helpful here is a link to one http://www.csgnetwork.com/compcalc.html