Please clarify your question. For the most part, the trail itself is free. There are a few places where shelters and tent sites have a caretaker, and there is usually a fee there. Mostly in Vermont, the White Mountains, and Baxter State Park. Other than that, the money is spent in towns along the way.
Generally speaking, a thru-hike costs between $3000 and $4000 for most people. Many spend less (I did), some spend more. It largely depends on how well you want to live while in town, and how much time you spend in towns.
Peaks