Banking on standard tax deductions from your marijuana business? Don’t count on it.

Four states and the District of Columbia have legalized recreational marijuana. While that may be a good thing for state tax collections in Colorado, Washington, Oregon, Alaska and Washington, D.C., the federal level is an entirely different story.

The issue is that the feds still regulate marijuana as a controlled substance. That means it’s illegal, on the federal level, to sell or possess the drug. That legal status also gums up the works when it comes to the application of tax laws.

A memorandum from the I.R.S. chief counsel, numbered 201504011, spells out in more detail the legal position of the feds.

No Tax Deductions for Controlled Substances

The relevant I.R.S. tax code section is 280E, which specifically forbids deductions for any business that traffics controlled substances. The I.R.S., on a regular basis, uses the code language to deny requested tax deductions for marijuana businesses.

Thus, a paradox exists: a business that is technically illegal under federal law must nevertheless pay federal income tax on its revenue (see section 61 of the tax code).

Weighing Cocaine

It wasn’t always this way. Back in 1982, an illegal business could reduce its revenue by the cost of any product that it sold. Legal precedents even upheld the deductible cost of a small scale used to weigh cocaine sold by a taxpayer.

Section 280E changed all that, reversing the legal ruling that upheld the cocaine scale’s tax status.

Strangely enough, there is a tiny loophole in Section 280E for marijuana businesses. A marijuana facility can deduct the cost of purchasing or growing its product. All other business expenses (not tied to manufacturing) will be denied.

Medical Use

Even medicinal marijuana businesses have been slammed by Section 280E. However, a medical dispensary was able to gain some relief from a 2002 legal case. The dispensary convinced the court that only some of its business involved the trafficking of marijuana. Most of its business stemmed from counseling customers. Thus, business expenses attributable to the consulting side of the business were given the court’s blessing as deductible.

Later cases did not turn out as well for medical dispensaries, however. The IRS denied all attempted expense deductions of a Marin County, Calif., business in 2011. And later the same year, the IRS denied similar deduction attempts from a dispensary. However, a tax court later granted some relief to the business, saying that since its cost of goods sold represented 75% of its revenue, that amount should be deducted. A federal appellate court upheld the tax court’s ruling this year.

Cost of Goods Sold

The cost of goods sold question has become a key plank for marijuana businesses to achieve some deductions.

Marijuana businesses, both producers and resellers, must capitalize into inventory the costs that are required under Section 471 of the tax code, as well as a portion of costs associated with payroll, legal and personnel functions.

Taxpayers in the medicinal marijuana business have embraced rules under Section 263A, because they can capitalize as many of their expenses as possible into inventory.

Things become trickier when cash-basis facilities are considered. With a cash-basis marijuana facility, the IRS can permit the taxpayer to deduct from its gross income the costs that would have been applied to inventory, if the taxpayer had been on the accrual method.

For more analysis on the Section 280E issue read the National Cannabis Industry Association’s white paper and check out Tony Nitti’s Section 280E article at Forbes.