This has been a central question since the beginning of time... or at least since the industrial revolution and the inception of automated knitting and weaving.
It's actually an important concept since it is the only way to compare the weight of two different fabric styles (or "qualities", as referenced in the textile industry). One quality can be wider than another and although heavier in actual weight (per linear yard) it could be lighter in square weight, thus a lighter piece of goods.
A square weight is calculated by taking a yardstick and weighing a 36"x36" piece. A linear weight is achieved by measuring a 36" length of the cloth (which is typically wider than 36"), cutting it selvedge to selvedge, and weighing that cut piece. Thus the weight of a linear yard is most likely heavier than the square weight. The distinction should always be made prior to purchase, so the correct weight for a particular project is bought.
Typically, at the mill, the square weight is determined by "punch weight". This is accomplished by having a cutting tool similar to a die cutter that literally punches out small consistently sized pieces of fabric samples. They are then weighed, and through a calculation, square weight per yard is determined.
Sometimes weight is listed in grams per meter. That is, of course, utilizing the metric system, which is typical of imported goods. Made in USA goods generally use the good old "Imperial system" rather than the metric system. Ounces and pounds are called "avoirdupois" units of measure (a great word for crossword puzzle and scrabble buffs out there).
Since knits are harder to finish with spot on presumptive precision than wovens, there is usually a little "wiggle room" for anticipated ozs/yard sq. weight. If goods, for instance, are listed as 5 ozs/yd square, they can typically run .25 or even .5 ozs/square yard lighter or heavier. It's just endemic to the nature of finishing goods that stretch under varying factors and conditions. Those variables can be a discussion for another day!
Thank you to Daniel for his clear explanation of the difference between the weight/square yard and the weight/linear yard! We include both weight/square yard and weight/linear yard (and gsm!) for our knits, and we include the weight/square yard and gsm for our woven fabrics.
The easiest way to compare the weights of two fabrics is to use the weight/square yard or gsm. If you would like to calculate weight/square yard from a fabric that is listed in weight/linear yard, you can use the following formula:
oz/sq yd = oz/linear yard x (36/width of fabric in inches)