I am looking into converting a tricycle gear trainer I have into a taildragger and want to know what the formula is for figuring out where to mount the main gear in relation to the CG and leading edge of the wing?

I don't know any formulas, but a few of the tail draggers I have in my hanger all have the gear +/- 1/2" from the leading edge. This covers anything from a Champion (+1/4"), E3D (+1/2") to 60" Shoestring (-1/4") or GEE BEE R2 (0")

Images

Here's the guidance from the book, "Basics of RC model aircraft design". With your plane in a level attitude, and at a height that gives you your desired prop clearance, draw a line straight down from a point on the bottom of the wing at your forwardmost cg straight down. Now draw another line downward from that same point at an angle of 15-20 degrees from the vertical line toward the nose of the airplane. The contact point of your wheel will be where that second line touches the ground. The center of the wheel is located dierctly above that spot. Sorry for the long explanation, but I'm trying to describe this from a drawing in the book.