The profits are considered income. You fill out a Schedule E form to calculate this. It is calculated for that tax year, and I don't think you can hide it by just sticking it in an LLC.
I wouldn't compare just the tax rates of stock earnings (I'm assuming long term capital gains, here) vs the income taxed earnings from real estate, since it's so much more complicated than that. What is the return on investment for each opportunity? After leveraging with a mortgage and then getting a tax deduction for paying off said mortgage, after deducting property taxes and insurance and repairs and all the other things, is your "profit" withdrawal less than the depreciation deduction? There's a good chance that while, at least on paper, you did not make a "profit", you were still able to put money in your bank account at the end of the month.
I was considering leaving the money in the LLC/c-Corp until your personal tax rates were more favorable...effectively deferring the personal income tax. I'm not a tax accountant so I don't know how realistic that is, and it was just a thought, I'm sure there are far more variables to consider before going down that road. Good point on depreciation.
Here's an example of what I was thinking, with made up numbers to make it easier:
Down payment: 10,000
Yearly profit: $1140 (95/mo profit after expenses)*0.7=+$798 after tax
Investing: 10,000 at 8% return: 10,800
So, after one year with avg stock market gains your portfolio is worth 10,800. With the house it would be worth $11,40 before tax or $10,798 after, $2 less than the index fund. Of course the numbers are made up, but unless I'm missing something it seems like your personal income tax rate should be a factor when comparing the return from real estate to other options.