The calculator utilizes the formula: Profit = (Selling Price − Buying Price) × Number of Shares.