Consolidation goodwill vs gain

In business consolidations, is there a difference between how to calculate goodwill (full goodwill method) and calculating gain? Are they the same? Goodwill = fair value of sub - fair value of sub's net assets From my understanding, this is also how you arrive at a gain. Please help clear this up! thanks!!