The basic formula for calculating inventory is:
Beginning inventory + net purchases – COGS = inventory.