Capital Gains Tax with Multiple 'buy' Transactions per Stock (U.S.)
From 26 CFR 1.1012(c)(1)i): ... if a taxpayer sells or transfers shares of stock in a corporation that the taxpayer purchased or acquired on different dates or at different prices and the taxpayer does not adequately identify the lot from which the stock is sold or transferred, the stock sold or transferred is charged against the earliest lot the taxpayer purchased or acquired to determine the basis and holding period of the stock. From 26 CFR 1.1012(c)(3): (i) Where the stock is left in the custody of a broker or other agent, an adequate identification is made if—   (a) At the time of the sale or transfer, the taxpayer specifies to such broker or other agent having custody of the stock the particular stock to be sold or transferred, and ... So if you don't specify, the first share bought (for $100) is the one sold, and you have a capital gain of $800. But you can specify to the broker if you would rather sell the stock bought later (and thus have a lower gain). This can either be done for the individual sale (no later than the settlement date of the trade), or via standing order: 26 CFR 1.1012(c)(8) ... A standing order or instruction for the specific identification of stock is treated as an adequate identification made at the time of sale, transfer, delivery, or distribution. "According to the following article the answer is ""first-in, first-out"": http://smallbusiness.chron.com/calculate-cost-basis-stock-multiple-purchases-21588.html According to the following article the last answer was just one option an investor can choose: https://www.usaa.com/inet/pages/advice-investing-costbasis?akredirect=true"
"Here are some things to consider if you want to employ a covered call strategy for consistent returns. The discussion also applies to written puts, as they're functionally equivalent. Write covered calls only on fairly valued stock. If the stock is distinctly undervalued, just buy it. By writing the call, you cap the gains that it will achieve as the stock price gravitates to intrinsic value. If the stock is overvalued, sell it, or just stay away. As the owner of a covered call position, you have full exposure to the downside of the stock. The premium received is normally way too small to protect against much of a drop in price. The ideal candidate doesn't change in price much over the life of the position. Yes, this is low volatility, which brings low option premiums. As a seller you want high premiums. But this can't be judged in a vacuum. No matter how high the volatility in absolute terms, as a seller you're betting the market has overpriced volatility. If volatility is high, so premiums are fat, but the market is correct, then the very real risk of the stock dropping over the life of the position offsets the premium received. One thing to look at is current implied volatility for the at-the-money (ATM), near-month call. Compare it to the two-year historical volatility (Morningstar has this conveniently displayed). Moving away from pure volatility, consider writing calls about three months out, just slightly out of the money. The premium is all time value, and the time value decay accelerates in the final few months. (In theory, a series of one-month options would be higher time value, but there are frictional costs, and no guarantee that today's ""good deal"" will be repeatable twelve time per year.) When comparing various strikes and expirations, compare time value per day. To compare the same statistic across multiple companies, use time value per day as a percent of capital at risk. CaR is the price of the stock less the premium received. If you already own the stock, track it as if you just bought it for this strategy, so use the price on the day you wrote the call. Along with time value per day, compare the simple annualized percent return, again, on capital at risk, measuring the return if a) the stock is called away, and b) the stock remains unchanged. I usually concentrate more on the second scenario, as we get the capital gain on the stock regardless, without the option strategy. Ideally, you can also calculate the probability (based on implied volatility) of the stock achieving these price points by expiration. Measuring returns at many possible stock prices, you can develop an overall expected return. I won't go into further detail, as it seems outside the scope here. Finally, I usually target a minimum of 25% annualized if the stock remains unchanged. You can, of course, adjust this up or down depending on your risk tolerance. I consider this to be conservative." "This forum is not intended to be a discussion group, but I would like to add a different perspective, especially for @MrChrister, on  @littleadv's rhetorical question  ""... estates are after-tax money, i.e.: income tax has been paid on them,    yet the government taxes them again. Why?"" For the cash in an estate, yes, that is after-tax money, but consider other assets such as stocks and real estate. Suppose a rich man bought stock in a small computer start-up company at $10 a share about 35 years ago, and that stock is now worth $500 a share. The man dies and his will bequeaths the shares to his son. According to US tax law, the son's basis in the shares is $500 per share, that is, if the son sells the shares, his capital gains are computed as if he had purchased the shares for $500 each. The son pays no taxes on the inheritance he receives. The deceased father's last income tax return (filed by the executor of the father's will) does not list the $490/share gain as a capital gain since the father did not sell the stock (the gain is what is called an unrealized gain), and so there is no income tax due from the father on the $490/share. Now, if there is no estate tax whatsoever, the father's estate  tax return pays no tax on that gain of $490 per share either. Would this be considered an equitable system? Should the government not tax the gain at all? It is worth noting that it would be possible for a government to eliminate estate taxes entirely, but instead have tax laws  that say that unrealized gains on the deceased's property would be taxed (as capital gains) on the deceased's final tax return." Based on my research, the answer is both. You would pay taxes on the bitcoin you mine as income, and then capital gains tax when you sell them for a profit (or capital loss if you lose value on the sale).  You can write off a portion of your electricity bill and hardware purchased for the use of mining as a business expense, but it's recommended that you consult a tax professional for determining the proper amount that is eligible for a deduction.  From Forbes: New Bitcoin are being issued by the system roughly every 10 minutes by   a process called mining. In mining, computers running the Bitcoin   software around the world attempt to solve math problems and the first   computer to come up with the solution adds the most recent   transactions to the ledger of all Bitcoin transactions, plus receives   the new bitcoins created by the system, called the block reward. If you are a miner and win the block reward, you must record the fair   market value of Bitcoin that day and mark that as an addition to your   personal or business income. Also note the date and timestamp at which   your coins were mined. Later, when you dispose of those Bitcoin, you   will subtract the date of acquisition from the date of disposal, and   you will be taxed a long-term capital gains rate on any Bitcoin you   held for more than a year, and a short-term capital gains rate on any   Bitcoin you held for a year or less. (The timestamp isn’t absolutely   necessary, but is helpful to validate the order of multiple   acquisitions or disposals within a day.) The amount you pay in taxes on a long-term capital gain will depend on   your income-tax bracket, while short-term capital gains are taxed the   same as ordinary income. From bitcoin.tax:  Another clarification in the IRS's March notice was how mining should   be treated. Mining is income, on the day of receipt of any coins and   at the fair value of those coins. This means that if you mined any   Bitcoins or alt-coins either solo, as part of a pool, or through a   cloud provider, you need to report any coins you received as income. Where it is less clear, is what that dollar value might be, since the   fair value is not always as easy to determine.  Bitcoins, Litecoins,   Dogecoins, are all examples of where there is a direct USD market and   so you can easily find out their value of any given day. However, a   newly created alt-coin that was mined in its early days has no direct   market and so how do you determine its value? Or for any alt-coin,   e.g. ABC coin, that has no direct USD market but does have a BTC   market. Does it have a value? Do you have to make a conversion from   ABC to BTC to USD?  Since there is no clarification yet from the IRS on   this issue you should discuss how to proceed with your own tax   professional. BitcoinTaxes has taken a prudent approach and calculates   value where a fiat or BTC market exists, converting an alt-coin to BTC   to USD as necessary. And from Bitcoin magazine: The IRS also stated mined bitcoins are treated as immediate income at   the market value of those mined coins on their date of mining. “Most don’t know they can write off any losses they have,” said Libra   founder Jake Benson. “The IRS allows you to offset income by up to   $3,000 per year on capital losses.  If you have losses and you aren’t   writing them off, then it’s like throwing money away. Nobody likes   doing taxes, but if you can owe less or increase your return, then   doing your Bitcoin taxes often results in a benefit. In fact, the   majority of our users are filing a capital loss, which means they’ve   actually saved money by using our tool.”  Benson also gives insight for miners.  “Mining is considered income, so know the price of Bitcoin at the time   you mined it,” he said. “If you make money on Bitcoin trading, the IRS   requires that you report gains with line level detail.”  The   appropriate form for that is 8949, a sub-form of schedule D. Gains and   losses, as outlined above, are treated like every other capital asset. "1) When it says ""an investment or mutual fund"", is a mutual fund not   an investment? If no, what is the definition of an investment? A mutual fund is indeed an investment. The article probably mentions  mutual funds separately from other investments because it is not uncommon for mutual funds to give you the option to automatically reinvest dividends and capital gains.    2) When it says ""In terms of stocks"", why does it only mention   distribution of dividends but not distribution of capital gains? Since distributions are received as cash deposits they can be used to buy more of the stock. Capital gains, on the other hand, occur when an asset increases in value. These gains are realized when the asset is sold. In the case of stocks, reinvestment of capital gains doesn't make much sense since buying more stock after selling it to realize capital gains results in you owning as much stock as you had before you realized the gains. 3) When it says ""In terms of mutual funds"", it says about ""the   reinvestment of distributions and dividends"". Does ""distributions"" not   include distributions of ""dividends""? why does it mention   ""distributions"" parallel to ""dividends""? Used in this setting, dividend and distribution are synonymous, which is highlighted by the way they are used in parallel. 4) Does reinvestment only apply to interest or dividends, but not to   capital gain? Reinvestment only applies to dividends in the case of stocks. Mutual funds must distribute capital gains to shareholders, making these distributions essentially cash dividends, usually as a special end of year distribution. If you've requested automatic reinvestment, the fund will buy more shares with these capital gain distributions as well." Equal sized gains and losses in alternating years would lead to an   unjust positive tax. On the contrary. If I can take my gains at the long term rate (15%) in even years, but take losses in odd years, up to $3000, or let them offset short term gains at ordinary rate, I've just gamed the system.  What is the purpose of the wash sale rule? Respectfully, we here can do a fine job of explaining how a bit of tax code works. And we can suggest the implication of those code bits. But, I suspect that it's not easy to explain the history of particular rules. For wash sale, the simple intent is to not let someone take a loss without actually selling the stock for a time. You'd be right to say the +/- 30 days is arbitrary.  I'd ask you to keep 2 things in mind if you continue to frequent this board - "This answer is about the USA. Each time you sell a security (a stock or a bond) or some other asset, you are expected to pay tax on the net gain. It doesn't matter whether you use a broker or mutual fund to make the sale. You still owe the tax. Net capital gain is defined this way: Gross sale prices less (broker fees for selling + cost of buying the asset) The cost of buying the asset is called the ""basis price.""  You, or your broker, needs to keep track of the basis price for each share. This is easy when you're just getting started investing. It stays easy if you're careful about your record keeping.  You owe the capital gains tax whenever you sell an asset, whether or not you reinvest the proceeds in something else. If your capital gains are modest, you can pay all the taxes at the end of the year. If they are larger -- for example if they exceed your wage earnings -- you should pay quarterly estimated tax. The tax authorities ding you for a penalty if you wait to pay five- or six-figure tax bills without paying quarterly estimates.  You pay NET capital gains tax. If one asset loses money and another makes money, you pay on your gains minus your losses. If you have more losses than gains in a particular year, you can carry forward up to $3,000 (I think). You can't carry forward tens of thousands in capital losses.  Long term and short term gains are treated separately. IRS Schedule B has places to plug in all those numbers, and the tax programs (Turbo etc) do too. Dividend payments are also taxable when they are paid. Those aren't capital gains. They go on Schedule D along with interest payments. The same is true for a mutual fund. If the fund has Ford shares in it, and Ford pays $0.70 per share in March, that's a dividend payment. If the fund managers decide to sell Ford and buy Tesla in June,  the selling of Ford shares will be a cap-gains taxable event for you.  The good news: the mutual fund managers send you a statement sometime in February or March of each year telling what you should put on your tax forms.  This is great. They add it all up for you. They give you a nice consolidated tax statement covering everything: dividends, their buying and selling activity on your behalf, and any selling they did when you withdrew money from the fund for any purpose.   Some investment accounts like 401(k) accounts are tax free. You don't pay any tax on those accounts -- capital gains, dividends, interest -- until you withdraw the money to live on after you retire. Then that money is taxed as if it were wage income. If you want an easy and fairly reliable way to invest, and don't want to do a lot of tax-form scrambling, choose a couple of different mutual funds, put money into them, and leave it there. They'll send you consolidated tax statements once a year. Download them into your tax program and you're done. You mentioned ""riding out bad times in cash.""  No, no, NOT a good idea. That investment strategy almost guarantees you will sell when the market is going down and buy when it's going up. That's ""sell low, buy high."" It's a loser. Not even Warren Buffett can call the top of the market and the bottom.  Ned Johnson (Fidelity's founder) DEFINITELY can't." "The question you are asking concerns the exercise of a short option position.  The other replies do not appear to address this situation. Suppose that Apple is trading at $96 and you sell a put option with a strike price of $95 for some future delivery date - say August 2016.  The option contract is for 100 shares and you sell the contract for a premium of $3.20. When you sell the option your account will be credited with the premium and debited with the broker commission.  The premium you receive will be $320 = 100 x $3.20.  The commission you pay will depend on you broker. Now suppose that the price of Apple drops to $90 and your option is exercised, either on expiry or prior to expiry.  Then you would be obliged to take delivery of 100 Apple shares at the contracted option strike price of $95 costing you $9,500 plus broker commission.  If you immediately sell the Apple shares you have purchased under your contract obligations, then assuming you sell the shares at the current market price of $90 you would realise a loss of $500 ( = 100x($95-$90) )plus commission.  Since you received a premium of $320 when you sold the put option, your net loss would be $500-$320 = $180 plus any commissions paid to your broker. Now let's look at the case of selling a call option.  Again assume that the price of Apple is $96 and you sell a call option for 100 shares with a strike price of $97 for a premium of $3.60.  The premium you receive would be $360 = 100 x $3.60.  You would also be debited for commission by your broker. Now suppose that the price of Apple shares rises to $101 and your option is exercised.  Then you would be obliged to deliver 100 Apple shares to the party exercising the option at the contracted strike price of $97.  If you did not own the shares to effect delivery, then you would need to purchase those shares in the market at the current market price of $101, and then sell them to the party exercising the option at the strike price of $97.  This would realise an immediate loss of $400 = 100 x ($101-$97) plus any  commission payable.  If you did own the shares, then you would simply deliver them and possibly pay some commission or a delivery fee to your broker.  Since you received $360 when you sold the option, your net loss would be $40 = $400-$360 plus any commission and fees payable to the broker. It is important to understand that in addition to these accounting items, short option positions carry with them a ""margin"" requirement.  You will need to maintain a margin deposit to show ""good faith"" so long as the short option position is open.  If the option you have sold moves against you, then you will be called upon to put up extra margin to cover any potential losses." Assuming you bought the stocks with after-tax money, you only pay tax on the difference. Had you bought he shares in a pretax retirement account, such as an IRA or 401(k), the taxation waits until you withdraw, at which point, it's all taxed as ordinary income.