My seat of the pants method: Disclaimer: I don't run Fanuc, so I cannot interpret your G76 exactly.
First, gather some important info about the thread:
Pipe OD = .540
Effective thread length = .40
Pitch diameter at effective length = .503 (book value)
Thread height = .044 (book value)
taper = 3/4" per foot = .0625" rise (diametral X) per inch of Z run
So if you start with the tool .1" in front of the piece, the total Z travel is .500" During this time the tool withdraws .0625 * .500 = .031" in X, and you might have to split this in half to get "I" if it is a radial amount.
Now the pitch diameter (from the book) is the diameter at the half depth of the thread at the big end. So if you used a sharp tool, then the X endpoint will be as far below the book pitch diameter as the pipe OD is above the pitch diameter.
.540 - .503 = .037 * 2 = .074 therefore the X endpoint will be .540 - .074 = 0.466
I always consider this to be an approximation for a first trial cut, because I've always made final adjustments with the tool offset for a thread tool, to get the engagement correct. Or, the X endpoint could also be tweaked up or down if you would rather leave the tool offset alone.
But if you vary the Z length of the threading pass (you decide its not long enough or you didn't start the tool far enough from the end of the part), then recalculate I because the taper's vector component in X is proportional to the Z length.
First you get good, then you get fast. Then grouchiness sets in.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)