Like Insidious C mentioned, you need to figure out what size quill and handlebar clamp you need before selecting a replacement. The length doesn't matter if the part won't fit your bike.
The quill is the part of the stem that sticks down into the fork's steerer tube. The outside diameter of your fork's steerer tube will be either 1" or 1 1/8", and a stem's quill will be sized for one or the other. They're not interchangeable. If you don't have calipers or a ruler handy to measure, you can check the size by using a U.S. or Canadian quarter. A quarter will fit into a 1 1/8" steerer, but not into a 1" steerer.
Canadian quarter = 23.88 mm
U.S. quarter = 24.26 mm
Diameter of quill for 1" steerer = 22.2 mm
Diameter of quill for 1 1/8" steerer = 25.4 mm (1")
As for the other dimension, handlebar clamp diameter... You may want to measure to be sure, but I'd feel pretty safe guessing that if your bike's old enough to use a quill stem, it'll have a 25.4 mm (1") handlebar diameter. That was a pretty standard size for flat bars like you'd find on mountain bikes. There are probably exceptions to the rule, but bigger diameters like 31.8 mm came into general use after the industry moved from quill stems.