A computer counts as an ordinary and necessary business expense for almost any freelancer, so the cost is deductible in proportion to how much you use it for work. If the laptop is used 100 percent for your business, you deduct 100 percent of the price. If you use it 70 percent for work and 30 percent for personal, you deduct 70 percent.
You generally do not have to spread the deduction over several years. Under Section 179 (or the de minimis safe harbor for lower-cost items), you can expense the entire business-use cost in the year you buy and start using it, which is simpler and front-loads the tax benefit.
Accessories that go with it, like a mouse, a docking station, a laptop bag, or a monitor, are deductible on the same basis. Keep the itemized receipt and a note of the business-use percentage in case you are ever asked.

