“CC” your heads, don’t guess!  Enter your bore, stroke, head volume, and deck height.  Then press the “Calculate” button to run the program.  Try various deck heights until the desired compression ratio is indicated.
There are many factors that affect the octane requirement, including: air density, humidity, air-fuel ratio, ignition advance, head temperature, carburation, and the camshaft.  A small increase in compression ratio will only slightly increase power but any detonation can quickly destroy your motor.

Static compression ratio and deck height calculator

  Cylinder bore   millimeters (mm)
  Crankshaft stroke   millimeters (mm)
  Cylinder head volume   cubic centimeters (cc’s)
  Valve relief pocket, gasket or other volume. Use minus number for dome or pop-up.   cubic centimeters (cc’s)
  Deck height   deck is in: inches mm
  Compression ratio   ratio