Magnetic compression based anastomoses use magnetic force to necrose tissue between two magnets to create an anastomosis. Nickel-plated neodymium–iron–boron magnets are used in our study. The compression pressure between the magnets depends on the distance between the magnets, which is determined by the thickness of the compressed tissue and depends on bowel wall thickness and elasticity. It is critical to know the distance between the magnets once the tissue is compressed because the magnets must be within a critical distance of each other in order to create enough compressive force to necrose the tissue. We have developed an inductance sensor to detect the distance (tissue thickness) between the two magnets after the surgeon has deployed them. Inductance sensing is a contact-less sensing method that enables precise short-range detection of conducting surfaces. The inductor coil mounted on one magnet detects the second magnet by measuring the change in inductance due to eddy current induced on the nickel-plated surface of the second magnet. The change in the inductance is proportional to the change in distance between the magnets. The sensor was first calibrated by using polycarbonate sheets to simulate the intestine tissue. We are able to detect up to 6 mm of spacing between the magnets. Pig intestine from Yorkshire pigs was used to characterize the sensor. We are able to distinguish up to five distinct layers of the intestine from the large intestine. This sensing mechanism can indicate the operating surgeon the exact thickness of the tissue compressed between the two magnets. The surgeon can thus be sure of formation of a clean anastomosis and avoid the likelihood of the magnets sliding away or uncoupling.