I do not know where your transducer is located but it’s pretty common for them to be through the hull at a point forward of the keel, thus below the waterline. The number you need to know is the distance from your transducer to the bottom of your keel. Depending on the age of your depth sounder, you should be able to calibrate it so you have a more accurate reading. Otherwise, you have to do the math.
If the distance from transducer to keel bottom is 3 feet, and you were showing a depth of 3.5 feet, you had .5 feet clearance. (Assuming you do not have a shallow draft keel. Draft for those is reported as 3.33’.)