Back to skills
SKILL.md
Profit Margin Calculator Shopify
ASecurityShopify/DTC profit margin calculator for sellers. Calculate cost breakdowns including ad spend, CAC, payment processing fees, and 3PL costs. Includes LTV/CAC analysis and DTC-specific benchmarks. No API key required.
- 1,615 stars
- 0 votes
- 0 copies
- 2 views
- Added May 27, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add nexscope-ai/eCommerce-Skills --skill profit-margin-calculator-shopify --agent claude-codeAre you the author of Profit Margin Calculator Shopify?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nexscope-ai-profit-margin-calculator-shopify)---
name: profit-margin-calculator-shopify
version: 1.0.1
description: "Shopify/DTC profit margin calculator for sellers. Calculate cost breakdowns including ad spend, CAC, payment processing fees, and 3PL costs. Includes LTV/CAC analysis and DTC-specific benchmarks. No API key required."
metadata: {"nexscope":{"emoji":"💰","category":"ecommerce"}}
---
# Profit Margin Calculator — Shopify/DTC 💰
Calculate product profitability for Shopify and DTC stores — cost breakdowns, profit margins, and CAC/LTV analysis.
## Installation
```bash
npx skills add nexscope-ai/eCommerce-Skills --skill profit-margin-calculator-shopify -g
```
## Cost Components
| Cost Item | Description | Notes |
|-----------|-------------|-------|
| Product Cost | FOB purchase price | - |
| Inbound Shipping | To 3PL warehouse | - |
| 3PL Fulfillment | ShipBob/Deliverr etc. | - |
| **Payment Processing** | 2.9% + $0.30 | Shopify Payments |
| **Advertising** | 20-40% | Main cost ⚠️ |
| Return Cost | Return processing | - |
| Customer Shipping | If free shipping offered | Optional |
## DTC Characteristics
- **No platform commission**: Only payment processing fees
- **High ad spend ratio**: 20-40%, main cost driver
- **Requires high margins**: 60%+ gross margin to support ads
- **Focus on LTV/CAC**: Recommended >3
## Key Metrics
| Metric | Recommended |
|--------|-------------|
| Gross Margin | >60% |
| Net Margin | >20% |
| LTV/CAC | >3 |
| Repeat Rate | Higher = better |
## Usage
```bash
python3 scripts/calculator.py
python3 scripts/calculator.py '{"selling_price": 49.99, "ad_spend_ratio": 0.20, "product_cost": 12}'
```
Both commands analyze the same sample order. Payment processing defaults to Shopify Payments at 2.9% + $0.30. This calculator does not charge a percent-of-sale marketplace commission. Optional JSON fields: `fulfillment_fee` (3PL per order), `shipping_cost` (inbound freight), `customer_shipping` (shipping the store pays), `return_rate`, `return_processing_fee`, `other_fees`, `payment_rate`, `payment_fixed_fee`, `customer_ltv`, and `fixed_costs`.
## Output Example
```
💰 **Shopify/DTC Profit Analysis Report**
Selling Price $49.99 100.0%
────────────────────────────────────────
Product Cost -$12.00 24.0%
Payment Processing -$1.75 3.5%
Advertising -$10.00 20.0%
────────────────────────────────────────
Total Cost $23.75 47.5%
Gross Profit $37.99 76.0%
Net Profit $26.24 52.5%
💡 Max Affordable CAC: $36.24
```
No percent-of-sale marketplace commission is applied. Platform cost is payment processing only: Shopify Payments 2.9% + $0.30 = $1.75.
Gross profit is the selling price minus product cost, inbound shipping, 3PL fulfillment, and store-paid shipping. Net profit also subtracts payment processing, advertising, returns, and other fees. Max affordable CAC is net profit plus advertising: the most this order can spend on acquisition and still break even. Pass `customer_ltv` to add an LTV/CAC ratio. Pass `fulfillment_fee` to include 3PL; that sample leaves it at zero, so the report does not invent a fulfillment charge.
From this directory, `python3 tests/test_documented_example.py` checks that the command above still prints this report.
## DTC Golden Ratios
```
DTC Health Formula:
├── Gross Margin > 60%
├── Ad Spend < 30%
├── Fulfillment < 15%
├── Net Margin > 15%
└── LTV/CAC > 3
```
## vs Amazon
| Item | Amazon | Shopify/DTC |
|------|--------|-------------|
| Platform fee | 8-15% | 0% |
| Payment fee | Included | 2.9% + $0.30 |
| Ad spend | 10-20% | 20-40% |
| Margin need | 40%+ | 60%+ |
| Traffic | Platform | Self-built |
---
**Part of [Nexscope AI](https://www.nexscope.ai/?co-from=skill) — AI tools for e-commerce sellers.**
Files in this skill
- SKILL.md
- scripts/calculator.py
Attribution
Related skills
View all in data-ai →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.