Actual cost refers to the actual expenditures a firm incurs to produce or acquire a good or service, which are recorded in the firm's accounting books. Opportunity cost refers to the potential returns forgone by choosing one alternative over the best alternative. Explicit costs are actual expenses paid by the firm that are recorded in its accounting books, while implicit costs are theoretical and not recorded, representing potential earnings from self-owned resources. Total cost is the sum of total fixed costs and total variable costs, and profit is calculated as total revenue minus total cost. Cost can be measured in terms of total, average, or marginal cost.