Is there a set formula / ratio for creating a trademark symbol (TM) or adjusting numerals such as 2nd or 3rd to create the proper visual effect on the superscript? Currently I always just eyeball it to make it look right. Is there a set standard for this though?
It depends entirely on the font. Some fonts have the superscripting built in, others provide you with relatively full height glyphs. Among those that are predesigned, there are varying levels of optimization for varying point sizes. That last point is critical.
The principal considerations are: