DEV Community

seller-mind
seller-mind

Posted on

Building a Free Amazon FBA Fee Calculator: The Math Behind the Fees

Every Amazon FBA seller needs to understand their fees. But Amazon's fee structure is confusing — referral fees, FBA fees, storage fees, and more. I built a free calculator to make the math transparent.

The Challenge

Amazon's fee formula isn't simple:

Total Fees = Referral Fee + FBA Fulfillment Fee + Monthly Storage Fee

Where:
- Referral Fee = Item Price × Category Rate (8-15%)
- FBA Fee = based on weight + dimensions
- Storage Fee = volume × monthly rate (varies by season)
Enter fullscreen mode Exit fullscreen mode

Each category has different rates. Weight tiers are non-linear. Storage costs spike in Q4. The calculator needs to handle all these edge cases.

Architecture

I built it as a single-page app with no framework — vanilla JavaScript:

function calculateFBAFees(price, cost, weight, length, width, height, category) {
  // Referral fee (varies by category)
  const referralRate = CATEGORY_RATES[category] || 0.15;
  const referralFee = price * referralRate;

  // FBA fulfillment fee (based on size tier)
  const sizeTier = calculateSizeTier(weight, length, width, height);
  const fbaFee = FBA_FEE_TABLE[sizeTier];

  // Monthly storage (simplified)
  const volumeCubicFeet = (length * width * height) / 1728;
  const storageFee = volumeCubicFeet * STORAGE_RATE_PER_CUBIC_FOOT;

  return {
    referralFee: referralFee.toFixed(2),
    fbaFee: fbaFee.toFixed(2),
    storageFee: storageFee.toFixed(2),
    totalFees: (referralFee + fbaFee + storageFee).toFixed(2),
    profit: (price - cost - referralFee - fbaFee - storageFee).toFixed(2)
  };
}
Enter fullscreen mode Exit fullscreen mode

Key Decisions

1. No Backend Required

The calculator runs entirely in the browser. This means:

  • Instant results (no network round-trip)
  • Works offline
  • No data collection (privacy-friendly)

2. Category Rates as Config

Amazon updates rates occasionally. Instead of hardcoding, I used a configuration object:

const CATEGORY_RATES = {
  'electronics': 0.08,
  'clothing': 0.15,
  'home': 0.15,
  'toys': 0.15,
  'books': 0.15,
  'kitchen': 0.15,
  // ... more categories
};
Enter fullscreen mode Exit fullscreen mode

This makes updates a single-file change.

3. Responsive Design

Most sellers check fees on their phone. The layout adapts from desktop grid to mobile stack using CSS Grid:

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
Enter fullscreen mode Exit fullscreen mode

What I Learned

  1. Amazon's docs are the hardest part — The fee schedule spans multiple pages with footnotes and exceptions
  2. Sellers want profit margin, not just fees — I added a profit column because that's what sellers actually care about
  3. Free tools build trust — No email gate, no signup, just useful tool → leads to organic word-of-mouth

Try It

The calculator is free at SellerMind. No signup required.


FTC Disclosure: I built this tool. It's free to use, no affiliate links, no paid promotions.

What other tools would help your Amazon FBA business? Let me know in the comments.

Top comments (0)