Hi, Welcome to KnittingHelp forum. If you know the brand name of the yarn you might be able to find it on this site. Yarndex
This will bring up a page where you select the brand, etc. and it will bring up some information about the yarn including the yardage. If they don't have the yarn you have listed you might try VintageKnits
if it is an old yarn and you have the name. They have charts listing yarns by brand and weights (by this I mean fine or heavy yarn etc.) and give approximate yardages.
If neither of those helps there may be a way to figure approximate yardage based on "wraps per inch" and how much the yarn weighs in ounces or grams (go to the post office and ask them to weigh it--lol), but I don't know what it is, but persue a search of that nature. Or just guess, based on a similar yarn you can find the yardage for.