Comic Book side gig

Hello I have a question about my comic book side business.  Let's say this year I sell $15,000 of comic books but also buy $12,000 of new product.  Im I only responsible to pay on $3,000 of profit or would I owe tax on all 15,000 and buying new product and has no effect on that?