Cost basis is what a holding cost you in total — the price of every share you bought plus the commissions and fees that came with buying them. It is the reference point for measuring a gain or a loss, and it is a total rather than a per-share price.
Why fees are part of it
A purchase costs more than the quoted share price. Commissions, transaction fees, and any load charged by a fund are part of what you paid to acquire the position, so they belong in the basis. Folding them in raises the basis, which reduces the gain measured against it.
Buying at different prices
Most positions are built over time at different prices, so a single holding has one basis covering several purchases. Adding shares adds their cost to the total basis; selling part of a position removes a proportional share of it. Which shares count as sold depends on the accounting method your broker applies — average cost, first-in-first-out, or specific identification — and the method changes the gain reported on that sale without changing anything you own.
Adjustments
A basis is not always frozen at the purchase total. Reinvested dividends buy new shares and add their cost. Stock splits divide the same basis across more shares. Return-of-capital distributions reduce it. A holding inherited or received as a gift starts from a basis set by tax rules rather than by anything you paid.
Why it matters
Basis is what separates the value of a holding from the gain inside it. Two positions worth the same amount today can carry very different unrealized gains, and therefore very different tax consequences on sale, depending on what each one cost. NetWorthy records cost basis per holding as an entered total and reports market value against it — it does not track lots or accounting methods, so a tax figure comes from your broker's records rather than from here.
See also Unrealized Gain.