Closing inventory can be calculated as follows:
Sales - gross profit - opening inventory - purchases
Sales - gross profit – opening inventory + purchases
Sales - gross profit + opening inventory - purchases
Sales - gross profit – opening inventory + purchases
Sales - gross profit - opening inventory - purchases
Closing Stock
= Sales - gross profit - opening inventory - purchases