How do I calculate the value of my inventory for a small eBay reselling business?

My understanding of calculating inventory is as follows:

 

Inventory Value EOY 2023 = beginning of 2023 inventory value + purchases ( minus items I used personally ) + costs of labor ( not counting myself ) + materials + supplies

 

But what if some of the goods that were part of beginning of 2023 inventory value were sold in 2023 as well? Do I deduct those from my inventory calculation?

 

Do you subtract income from the goods sold in your inventory calculation? I'm confused on this.

 

Because if I take my previous years inventory value ( lets say its $10K ) and add it to my purchases / materials / supplies for this year ( let's say its $8k ) 

 

Then my inventory calculation is: $10K + $8K = $18K.. but IF some of those items that were part of the $10K in beginning of year inventory were SOLD in 2023, then that inventory value is false - because it makes it look like I have an inventory of $18K but indeed some of those goods were sold and reported as income..

 

I inputted my inventory calculation according to the formula above into turbo tax and my estimated Federal Taxes owed shot through the roof. I know I'm doing something wrong and I really need help. I don't want to get in trouble for falsifying inventory but I also don't want to grossly over pay in taxes because I can't figure out how to value my inventory correctly

 

Any help is GREATLY appreciated. Please and thank you!! : )

 

-Jeff