you need to know your swept volume which is the volume of the cylinder made by the bore and stroke of your engine.
You also need to know your chamber volume, which is any volume above the piston, including the top of the bore, chamber in the head and headgasket space.
These are what people normally measure with a syringe, by putting a greased perspex plate over the chamber of the head or block and letting in paraffin with a calibrated burette.
after that you need to add the two together to get the volume with the piston fully down, and divide that by the smaller volume (piston fully up)