There are a couple of approaches, depending on how much you know about the thing your macro is cutting. Basically, you're going to have to analyze the resulting geometry after the cut is made. For example, let's say your cut terminates on an angled surface. What depth do you want there?
What if it intersects multiple bodies? or only partly?
What if your cut sketch has multiple closed contours and terminates at an angled surface? Then you sort of have different depths, right?
What info are you really after? What if someone cuts away the terminating face in a later operation? Do you want to know the effective depth at that time, or at the time of the cut?
If you know that you're cutting from one planar face to a parallel planar face on the same body, you can pretty easily analyze the resulting geometry. Other cases get more complicated from there.