This excerpt taken from the HPQ 10-K filed Dec 18, 2007.
HP states property, plant and equipment at cost less accumulated depreciation. HP capitalizes additions and improvements. HP expenses maintenance and repairs as incurred. HP provides depreciation using straight-line or accelerated methods over the estimated useful lives of the assets. Estimated useful lives are 5 to 40 years for buildings and improvements and 3 to 15 years for machinery and equipment. HP depreciates leasehold improvements over the life of the lease or the asset, whichever is shorter. HP depreciates equipment held for lease over the initial term of the lease to the equipment's estimated residual value.
HP capitalizes certain internal and external costs incurred to acquire or create internal use software, principally related to software coding, designing system interfaces and installation and testing of the software. HP amortizes capitalized costs using the straight-line method over the estimated useful lives of the software, generally from three to five years.