Measure from the top of the bottom of the tail bone to the length you want the tail to be, usually around the pasterns or middle of the ankle. Then add about two inches on as you will tie the tail in up above the bottom of the tail bone. This will get you pretty close. And if the length is inbetween, go for slightly longer because as long as the horse has a decent amount of hair up top, you can always tie it in higher and keep it snug to the tail bone. If it's too short and you tie it in low, the fake tail will swing differently from the real tail, making it obvious that a fake one is in there.
Oh, and there is no specific length of tail for a horse height, as the length of the tail bone will differ - my mare is two inches shorter than my old gelding but needs a longer tail just because of how she is built.