You don't deduct inventory when you buy it. You deduct it when you sell it, as cost of goods sold on Schedule C.
The formula
Inventory at the start of the year + what you bought this year − inventory left at year-end = cost of goods sold.
What goes into cost
The price you paid, plus shipping to get it to you and costs to make it ready to sell. Selling fees and outbound shipping are separate expenses, not part of cost.
Track each item
A spreadsheet with item, date bought, cost, date sold and sale price makes this simple. If you buy in lots, divide the lot price across the items.
Small sellers
Smaller businesses can often treat inventory as non-incidental materials and supplies and deduct it when sold or used, which works much the same way in practice.
Want a number? Try the tax calculator. Ready to file? Compare tax software.