In general - there are two real assets - the land and the building - and allocation should be make for each.
The difference is that the land is not depreciated but the building does have accumulated depreciation which will be recaptured and added back to the taxable income.
In general the gain will be classified as section 1231 gain - and will be taxed as a long term capital gain at reduced rates - so the larger portion of the sale price is allocated to teh building and the land woudl be more beneficial for the seller.
The sale of a business usually is not a sale of one asset. Instead, all the assets of the business are sold. Generally, when this occurs, each asset is treated as being sold separately for determining the treatment of gain or loss.When sold, these assets must be classified as capital assets, depreciable property used in the business, real property used in the business, or property held for sale to customers, such as inventory or stock in trade.
The gain or loss on each asset is figured separately. The sale of capital assets results in capital gain or loss. The sale of real property or depreciable property used in the business and held longer than 1 year results in gain or loss from a section 1231 transaction. The sale of inventory results in ordinary income or loss.
Liabilities assumed by the purchaser is treated as cash payment.
Generally, both the purchaser and seller must file Form 8594 and attach it to their income tax returns when there is a transfer of a group of assets that make up a trade or business and the purchaser's basis in such assets is determined wholly by the amount paid for the assets.
So - we need to start with a list of assets - and will need to assigned a sale price to each asset - as agreed between parties.
Then - we will determine the gain or loss on each asset separately and separately will determine how that gain or loss is treated.
Thus - that would be more beneficial for you as a seller - if less would be allocated to assets which do not qualify for long term capital gain treatment - such as inventory, self-created intangible (customer list, non-compete agreement, goodwill), business assets held less than a year, etc.