Total cost on social media comes from two lines: content production and management, plus your ad budget. On the return side, what gets measured is the conversion of traffic arriving at your site from social channels: visits × conversion rate × average order value.

Social media's effects beyond direct sales (brand awareness, community, customer communication) do not enter this calculation, so the ROI you get here should be read as the lower bound of the channel's total value. To measure traffic correctly, use UTM tags on your social links and separate conversions by channel in your analytics.