The basic formula
Profit = Revenue − Costs. Revenue is the amount earned under your chosen definition; costs are the expenses included in the same period and scope. A formula is only useful when both sides use consistent dates and units.
Gross, operating and net profit
Gross profit subtracts direct costs such as cost of goods sold. Operating profit also considers operating expenses. Net profit goes further and may include interest, taxes and other items. Label the level instead of calling every result profit.
A simple example
If revenue is $25,000 and direct costs are $14,000, gross profit is $11,000 and gross margin is 44%. If operating expenses are another $7,000, operating profit is $4,000 before any items outside that definition.
Check before deciding
Include refunds, discounts, payment fees, fulfillment, payroll, software and other costs that change the decision. Then compare the result with cash collection, inventory and working-capital timing.