Cost of an asset is the total cost of acquiring and asset plus the cost incurred in bringing the asset to a working condition e.g cost of transporting the asset to factory, cost of installation etc.
Cost of the machine is:
Cost of acquisition $4,000,000
Cost of installation. $10,000
Building a clean room. $3,000,000
Total cost is. $7,010,000
No salvage value
Useful life is 5 years
Cost of depreciation using the straight-line method is
(cost of the asset - salvage value) ÷ number of useful life