Options · Tracking
How to calculate your cost basis after a put is assigned
Tortuga Trades · · 6 min
You sold a put, got assigned, and now you own 100 shares bought at $50 while the market pays $46 for them. Your broker's screen says you're down $400. The question I want to answer here is whether that figure is the true one —and the answer is no, because it leaves out a number you collected weeks earlier and that almost nobody looks at again: the premium.
What exactly happens on assignment day
It's worth being clear on the mechanism before touching the numbers, because all the later confusion comes from it. When you sold the put, you committed to buying 100 shares at the strike price if the buyer chose to exercise. In exchange for that commitment you collected a premium, and that money landed in your account that same day. It's yours, whatever happens next.
If the stock trades below the strike at expiration —or earlier, if the buyer exercises early—, you get assigned: the cash is taken from your account, the shares are delivered to you and the option disappears. And here is the detail that tangles everything up: your broker records those two events as two separate transactions. On one side, a sold option that closed at a profit. On the other, a purchase of shares at the strike price.
In other words: there is no screen that shows you the number that really matters, because that number is the combination of both and no report combines them for you.
The math almost everyone gets wrong
The intuitive calculation is to look at the strike price and compare it with the market price. If you were assigned at 50 and the stock is worth 46, you've lost $4 per share. It's quick, it's what the screen suggests, and it's wrong.
The real cost basis of those shares is the strike price minus the premium you collected, plus the commissions you paid along the way. With a premium of $1.20 per share and $1.30 in total commissions:
With the stock at $46, the unrealized loss isn't $400 but $281. The difference, $119, is exactly the premium you collected minus the commissions. It's not an accounting trick: that money has been in your account since the day you sold the put.
This is the economic cost, the one that tells you from what price you make money. Spain's tax authority splits it differently: according to the Dirección General de Tributos (ruling V0137-23), the put has its own gain or loss and the shares count as bought at their market value on assignment day. We walk through an example in the guide to selling puts.
Every later premium lowers the price again
If, after the assignment, you sell a covered call on those same shares, the premium you collect is subtracted again in the same way. Suppose you sell a call for a $0.80 premium with $1.30 in commissions:
Repeat that five or six times and the number drifts so far from the original strike price that keeping it in your head stops being possible. That's the point where most people stop updating it and start trading blind.
Watch the symmetry: if the covered call ends up exercised and your shares are called away, the premium no longer reduces any cost, because you no longer hold the position. It simply becomes profit on that round.
When there's more than one assignment: weighted average
The realistic case isn't one assignment, it's several. You sold another put lower down, got assigned on that one too, and now you have two lots of 100 shares with different costs. The average price of the combined position is the average weighted by number of shares, not the plain average.
With two equal lots the weighted average matches the simple average, and that's why this case is deceptive. As soon as the lots are different sizes —200 shares at one price and 100 at another— you have to multiply each cost by its shares, add them up, and divide by the total. Doing it in your head is where the mistakes creep in.
The formula, to keep handy
Average price = (cost₁ × shares₁ + cost₂ × shares₂ + …) ÷ (shares₁ + shares₂ + …), where each «cost» already has its premiums subtracted and its commissions added.
Why your broker doesn't show you this number
It's not an oversight by Interactive Brokers or anyone else. A broker records events: a sold option, an assigned option, a share purchase. Each with its date and amount. What it doesn't do —and has no reason to do— is interpret those three events as a single move of yours and aggregate them into a cost basis that reflects your intent.
That's why this calculation always ends up in the same place: a spreadsheet you update by hand, or a tool that understands that the premium of an assigned put belongs to the cost of the shares you received. If you do it by hand, the advice is simple: write down the real cost basis at the moment of assignment, not weeks later, because rebuilding it with the history in front of you takes three times as long.
- Record the premium net of commissions, not gross.
- Update the cost every time you collect a new premium on that same position.
- Keep the original strike price separately: you'll need it to know what you were assigned and at what price.
Keep reading
- How to track the wheel strategy: premiums, assignments and cost basisThe wheel takes five minutes to explain and three months to get out of hand. What to record on each turn to know whether you are really making money.
- How to create an Interactive Brokers Flex Query, step by stepCreate the query in Client Portal, enable the Flex Web Service token and connect your account without sharing your broker password.
- A TradeZella alternative for options tradersI was subscribed until April 2026 and left for five specific reasons. What a journal needs when you sell puts and covered calls, checked against their public sources.