Calculate your net margins, marketplace fees, and return on investment for any product.
Gross Revenue:
Total Expenses:
Net Profit:
Net Profit Margin:
Return on Investment (ROI):
Understanding E-commerce Profitability
Running a successful online store requires more than just making sales; it requires a deep understanding of your Net Profit Margin. Many new sellers focus on gross revenue, but the true health of a business lies in what remains after all expenses are paid.
Key Metrics in this Calculator
Cost of Goods Sold (COGS): The direct cost to manufacture or purchase the product from a supplier.
Marketplace Fees: Platforms like Amazon, Shopify, or Etsy typically charge a referral fee ranging from 3% to 20%.
Ad Spend per Sale: This is your Customer Acquisition Cost (CAC). If you spend $100 on ads and get 10 sales, your ad spend per sale is $10.
Net Profit Margin: The percentage of revenue that is actual profit. A margin of 20% or higher is generally considered healthy in e-commerce.
Example Calculation
Imagine you sell a gadget for $100. Your costs are:
Unit Cost: $30
Shipping: $10
Marketplace Fee (15%): $15
Ads: $10
Total Expenses = $65. Your Net Profit is $35, resulting in a 35% Net Margin and a 53.8% ROI ($35 Profit / $65 Investment).
function calculateEcommerceProfit() {
var salePrice = parseFloat(document.getElementById('salePrice').value) || 0;
var unitCost = parseFloat(document.getElementById('unitCost').value) || 0;
var shippingCost = parseFloat(document.getElementById('shippingCost').value) || 0;
var platformFeePct = parseFloat(document.getElementById('platformFee').value) || 0;
var adSpend = parseFloat(document.getElementById('adSpend').value) || 0;
var miscCosts = parseFloat(document.getElementById('miscCosts').value) || 0;
// Logic for platform fees (calculated on selling price)
var platformFeeAmount = salePrice * (platformFeePct / 100);
// Total expenses
var totalExpenses = unitCost + shippingCost + platformFeeAmount + adSpend + miscCosts;
// Net Profit
var netProfit = salePrice – totalExpenses;
// Net Margin (%)
var netMargin = 0;
if (salePrice > 0) {
netMargin = (netProfit / salePrice) * 100;
}
// ROI (%) – Net Profit / Total Capital invested per unit
var roi = 0;
if (totalExpenses > 0) {
roi = (netProfit / totalExpenses) * 100;
}
// Display Results
document.getElementById('results').style.display = 'block';
document.getElementById('resRevenue').innerText = '$' + salePrice.toFixed(2);
document.getElementById('resExpenses').innerText = '$' + totalExpenses.toFixed(2);
var profitEl = document.getElementById('resNetProfit');
profitEl.innerText = '$' + netProfit.toFixed(2);
if (netProfit >= 0) {
profitEl.className = 'result-value profit-positive';
} else {
profitEl.className = 'result-value profit-negative';
}
document.getElementById('resMargin').innerText = netMargin.toFixed(2) + '%';
document.getElementById('resROI').innerText = roi.toFixed(2) + '%';
// Scroll to results for mobile users
document.getElementById('results').scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}