Goodwill is an intangible asset typically measured or recorded when one company purchases another. Goodwill is calculated by the difference between the purchase price of the company and the sum of its fair market values of assets and liabilities.
Goodwill = P – (A + L)
P = Purchase price of company
A = Fair market value of assets
L = Fair market value of liabilities