I added 3% to cover PayPal's fee and still came up short. Here's the math I got wrong.
DEV Community

I added 3% to cover PayPal's fee and still came up short. Here's the math I got wrong.

My first real PayPal invoice was for $200. I knew PayPal "takes about 3%", so I expected roughly $194. I got $192.53.

That's $7.47 gone, not $6. It isn't a huge amount, but I couldn't explain it, and that bothered me more than the money.

Where the $7.47 came from

The buyer paid from their PayPal balance, so the rate was 3.49% + $0.49, not "about 3%":

200 ร— 0.0349 = 6.98
6.98 + 0.49 = 7.47
200 โˆ’ 7.47 = 192.53

Two things I'd ignored: the percentage was higher than I thought, and there's a fixed fee on top. On small payments, that fixed part hurts more than the percentage does.

The second mistake: "just add 3%"

My first instinct for the next invoice: if I want to receive $200, add 3% and charge $206. Run the numbers, and you'd keep $198.32. Still short.

The reason: the fee is charged on the extra you added too. Adding a percentage on top doesn't undo taking a percentage off, because the second percentage is taken from a bigger number.

The fix is to solve for the price instead of guessing:

you keep = price โˆ’ (price ร— rate + fixed)
you keep = price ร— (1 โˆ’ rate) โˆ’ fixed
price = (target + fixed) / (1 โˆ’ rate)

For a $200 target:

const rate = 0.0349, fixed = 0.49;
const priceFor = (target) => (target + fixed) / (1 - rate);
priceFor(200); // 207.74

Charge $207.74 and you keep exactly $200. It's two lines of algebra, and it's easy to skip.

It's not just PayPal

Once I started checking, every platform had its own trap:

  • eBay charges its fee on the whole order, including the sales tax the buyer pays. My $50 item + $8 shipping + 7% tax had a fee base of $62.06, not $58, so the fee was $8.84, not the $8.29 I'd worked out.
  • Stripe keeps its processing fee when you refund. A returned $100 sale still cost me $3.20.
  • Depop dropped its US selling fee, but the fixed 45ยข is about 3% on its own when you sell a $15 item.

None of this is hidden. It's all on the official fee pages. It's just spread across tables you have to squint at, and it's easy to calculate the simple version in your head and be wrong.

What I do now

  • Run the numbers before listing, not after the sale.
  • Ask how the buyer will pay. The rate can change a lot between a balance, a card and an international card.
  • Price backwards from what I want to keep, using the formula above, not "add a few percent".

I got tired of redoing this in a spreadsheet, so I put all of it into a small free calculator that shows each deduction line by line: Netted. Even if you never use it, the formula above is the useful part. Drop it into whatever invoicing script you have.

What fee caught you off guard the first time? I'm curious which ones trip people up most.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.