When the postion is at tdc aspace is left between its top and the end of the cylinder: the volume contained in this space is called the clearance volume. The volume enclosed above the piston at bdc consists of the clearance volume plus the swept volume and is called the total volume.
So you get
Compression ratio=Total volume divided by
Clearance volume
= Swept volume+Clearance volume divided by
Clearance volume
=Swept volume divided by
Clearance volume +1
Hope this helps you work out your compression ratio