We all have a silent partner when it comes to our taxable investments—Uncle Sam. He insists on his cut of our investment income and capital gains, even though he doesn’t share in the risks. At least our good uncle is kind enough to allow us a few tax breaks.

For example, we have tax-advantaged vehicles such as 401(k)s, IRAs, annuities, 529 college savings plans, Coverdell Education Savings Accounts and so on. And, if it makes sense for your marginal income tax bracket, you can also get a break on tax-exempt municipal bonds held in taxable accounts. And don’t forget the lower rate for long-term capital gains and qualified stock dividends.

But the tax breaks don’t end there. The Internal Revenue Service also lets you deduct certain investment expenses incurred on your taxable investments. Check with your tax professional to make sure you’re taking full advantage of investment-related miscellaneous itemized deductions, investment interest expense and capital losses.

Let’s look at each of these in turn.

Miscellaneous investment-related itemized deductions
Miscellaneous itemized deductions are generally limited to the amount of expenses over and above 2% of your adjusted gross income (AGI). In other words, there’s a floor below which you lose the ability to deduct.

For example: Say your AGI is $75,000 and you have $3,000 in miscellaneous itemized deductions. Your 2% AGI floor is therefore $1,500 (2% of $75,000). You lose the first $1,500 of the $3,000 you claim but get to deduct the remaining $1,500.

Here’s a list of investment-related expenses that you may be able to deduct:

• Fees for investment counsel and advice, including subscriptions to financial publications
• IRA or Keogh custodial fees, if paid by cash outside the account
• Software or online services used to manage your investments
• Safe deposit box rent, if used to store certificates or investment-related documents
• Transportation to your broker’s or investment advisor’s office
• Attorney, accounting or clerical costs necessary to produce or collect taxable income
• Charges for automatic investment services and dividend reinvestment plans
• Costs to replace lost security certificates

Investment-related expenses that can’t be deducted include:

• Trading commissions—these are “capitalized” to increase your cost basis and/or reduce your taxable sales proceeds
• Costs of traveling to attend a shareholder’s meeting
• Investment advisory fees related to tax-exempt income—you generally need to prorate these fees based on the portion of tax-exempt investment income versus total taxable investment income
• Borrowing costs associated with life insurance

Investment interest expense
Investment interest expense is the interest on money you borrow to purchase taxable investments. For example, you can deduct the interest on a margin loan you use to purchase stock, but not if you use the margin loan to buy a car or tax-exempt municipal bonds.

There’s a cap on deductibility equal to your net investment income, but any leftover interest expense can be carried over for future use, without expiration.

To calculate your net investment income—and therefore how much investment interest expense you can deduct—add up your taxable interest income, ordinary dividends and even long-term capital gains and qualified dividends (if you make a special election to treat them as ordinary income, more below). Then, subtract any investment-related miscellaneous itemized deductions you actually get to use.

For example: Say you have $10,000 of investment interest expense, $10,000 of taxable investment income and $5,000 of investment-related miscellaneous itemized deductions—$1,000 of which you can use given your AGI. Your net investment income is $9,000 ($10,000 in investment income minus $1,000 in allowable investment-related miscellaneous itemized deductions). You could deduct a matching amount of investment interest expense: $9,000.

The remaining $1,000 of unused investment interest expense could be carried forward for potential use in future years.

How do the qualified dividend rules impact investment interest expense?

Qualified dividends. Qualified dividends that receive preferential tax treatment aren’t considered investment income for purposes of the investment interest expense deduction.1 However, you could elect to treat qualified dividends as ordinary income (just as you can with net long-term capital gain income) to boost the amount you can deduct as investment interest expense. The concept here is that it’s better to pay 0% tax on qualified dividends than 15% or 20% tax.
Let’s go back to our example: If you also have $1,000 of qualified dividends, you could pay 15% (or 20%) tax on them, or you could elect to treat those dividends as ordinary income and boost your net investment income from $9,000 to $10,000—which means you could now deduct up to $10,000 in investment interest expense in the current year.

• Payment in lieu of dividends. If you buy dividend-paying stock on margin and your broker lends out the stock, you don’t really receive dividends; you receive payment in lieu of dividends. These payments are treated as ordinary income and aren’t eligible for the qualified dividend rate. But all is not lost: The payments are eligible to offset your investment interest expense.
However, if you already have sufficient ordinary investment income from other sources (or more payment in lieu of dividends than can be used), you’re stuck with ordinary tax treatment.

Capital losses
Capital losses can be used to offset capital gains without limit in any given year. If your capital losses exceed your capital gains, up to $3,000 in losses (or $1,500 each for married filing separately) could be used to offset ordinary income. Net losses of more than $3,000 can be carried forward to offset gains in the future.

Reminder on cost basis reporting rules
Since 2011, financial institutions have been required to report to the IRS the adjusted cost basis of sold securities acquired after a certain date, including:

• Equities acquired on or after January 1, 2011.
• Mutual funds, exchange-traded funds and dividend reinvestment plans acquired on or after January 1, 2012.
Other specified securities, including most fixed income securities and options acquired on or after January 1, 2014.

Keep in mind that the reporting rules only apply to the sale of securities purchased on or after the effective dates above. Whether cost basis is reported to the IRS or not, you are ultimately responsible for the information on your tax return. So it’s a good idea to save your original purchase and sale documentation, including records of any automatic reinvestments, to make sure it matches the information financial institutions will report to the IRS.

Also, even though FIFO (first in, first out) is the IRS default method for both individual securities and mutual funds, most institutions (including Schwab) will report individual securities using the FIFO default method and mutual funds using the average cost single-category method. Make sure your financial institution uses the accounting method of your choice.
For comprehensive information on investment expenses, as well as how to report all kinds of investment income, including mutual funds and the rules for netting short-term and long-term capital gains, see IRS Publication 550: Investment Income and Expenses.

Be sure to consult your tax professional about your unique situation, preferably well before the end of the year. And no matter the time of year, it’s also a good idea to check with your tax adviser before you enter into any transaction that might have significant tax consequences.

Rande Spiegelman is vice president of financial planning at the Schwab Center for Financial Research.

Read more here.