I'm close, but I'm still not quite getting it.

Does the weight listed in the pattern (40 grams) refer to the weight of the skein itself, or is it something else? I'm confused on how I know whether or not my new yarn is the same weight as the pattern calls for. If I can do that, then the yardage math is easy.