E-Commerce Calculator Suite - Formula Reference
1. ShippingCalculator
Base Formula:
cost = baseRate + (weight × costPerPound × carrierMult) + (distance × costPerMile × serviceMult)
Parameters:
- baseRate = $2.50
- costPerPound = $0.15
- costPerMile = $0.0025
- carrierMult: 1.0 (Standard), 1.5 (Express), 2.2 (Overnight), 3.5 (International)
- serviceMult: 1.0 (Ground), 1.8 (Air), 0.4 (Sea)
Insurance: +5% of subtotal if enabled
Days:
- Standard: 5 + service days
- Express: 3 + service days
- Overnight: 1 + service days
- International: 14 + service days
2. InventoryTracker
Days of Inventory:
daysOfInventory = currentStock ÷ dailyUsageRate
Reorder Cost:
reorderCost = max(0, (reorderPoint - currentStock) × unitCost)
Inventory Value:
value = currentStock × unitCost
Time to Reorder:
daysUntilReorder = (currentStock - reorderPoint) ÷ dailyUsage
Status Levels:
- CRITICAL: stock ≤ 0
- LOW-STOCK: stock ≤ reorderPoint
- OVERSTOCKED: stock > reorderPoint × 3
- IN-STOCK: else
3. PricingCalculator
Margin-Based:
sellingPrice = cost ÷ (1 - targetMargin%)
profit = sellingPrice - cost
markup% = (profit ÷ cost) × 100
margin% = (profit ÷ sellingPrice) × 100
Markup-Based:
sellingPrice = cost × (1 + markup%)
profit = sellingPrice - cost
margin% = (profit ÷ sellingPrice) × 100
Competitive:
sellingPrice = competitorPrice (if > margin-based calculation)
profit = sellingPrice - cost
margin% = (profit ÷ sellingPrice) × 100
markup% = (profit ÷ cost) × 100
4. ProfitMarginCalculator
Gross Profit Analysis:
grossProfit = revenue - COGS
grossMargin% = (grossProfit ÷ revenue) × 100
Operating Profit Analysis:
operatingProfit = grossProfit - operatingExpenses
operatingMargin% = (operatingProfit ÷ revenue) × 100
Net Profit Analysis:
taxesOwed = max(0, operatingProfit × taxRate%)
netProfit = operatingProfit - taxesOwed
netMargin% = (netProfit ÷ revenue) × 100
5. BreakEvenCalculator
Contribution Margin:
contributionMargin = sellingPrice - variableCostPerUnit
contributionMargin% = (contributionMargin ÷ sellingPrice) × 100
Break-Even Point (Units):
breakEvenUnits = fixedCosts ÷ contributionMargin
Break-Even Revenue:
breakEvenRevenue = breakEvenUnits × sellingPrice
Profit at X Units:
profit = (X × contributionMargin) - fixedCosts
Days to Break-Even:
daysToBreakEven = breakEvenUnits ÷ dailySalesUnits
6. DropshipPricingCalculator
Total Cost:
totalCost = wholesalePrice + platformFee + shippingCost
Retail Price (Margin-Based):
retailPrice = totalCost ÷ (1 - targetMargin%)
Retail Price (Competitive):
retailPrice = max(competitorPrice, totalCost ÷ (1 - targetMargin%))
Profit:
profit = retailPrice - totalCost
Profit Margin:
profitMargin% = (profit ÷ retailPrice) × 100
Markup:
markup% = (profit ÷ totalCost) × 100
ROI:
ROI% = (profit ÷ totalCost) × 100
Key Math Principles Used
- Margin vs Markup: Both start with cost, but margin divides by revenue, markup divides by cost
- Break-Even: Fixed costs divided by contribution per unit
- Profit Margin: Profit as percentage of revenue
- Inventory Velocity: Days a product lasts at current usage rate
- Pricing Strategies: Can be margin-driven, markup-driven, or competitive
All Formulas Verified and Working
✓ Shipping calculator handles multi-dimensional pricing ✓ Inventory formulas include status logic ✓ Pricing supports three independent strategies ✓ Margin calculation uses 3-tier profit analysis ✓ Break-even includes profit scenarios ✓ Dropship pricing handles cost aggregation and ROI
All calculations use proper floating-point rounding: Math.round(value × 100) / 100