Sharing info here on how to calculate the Cost of goods sold (COGS) in QuickBooks Online (QBO).
Before anything else, I'd like to know if you encountered some error while calculating your (COGS).
To calculate your (COGS), you must add the beginning of the year to purchases created throughout the year. After that, deduct the remaining inventory cost at the end of the year.