It's hard to get ahead with Uncle Sam stretching out his hand every time you earn a few extra bucks. While paying what you owe is the patriotic way, it's always nice to owe less rather than more. Here are some of the best (and strictly legal) ways to reduce your taxable income but still satisfy Uncle Sam when he comes knocking.

1. Take advantage of perks at work. If your employer offers a dependent care spending account or a health-care spending account, the dollars you sock away in the programs are deducted from your pre-tax pay.

Sometimes enrollment times are limited, so check with your human resources department to determine when you're eligible. Familiarize yourself with what qualifies as a reimbursable expense. For example, you may be surprised to learn that expenses for over-the-counter medicine may qualify under health-care flex spending or that, under the Child and Dependent Care credit, expenses for an after-school program may qualify for your kindergartener even though school does not.

2. Be cool; stay in school. Or at least pay for qualified expenses for your post-secondary education (or your spouse's or a dependent's) and you may qualify for the higher-education tuition and fees deduction.

Likewise, the interest on your student loan may be deductible. Or you may qualify for a benefit under the Lifetime Learning credit or the American Opportunity credit.

But make sure you're not double-dipping, i.e., taking more higher education deductions than are allowed. For example, you may not take both the Hope and the Lifetime Learning credits for the same student in the same year. Check the IRS' Publication 970, Tax Benefits for Education for details.

3. Fund your retirement. Failing to fund your 401(k) is like throwing away free money -- yes, even in times like these. That's because you pass up the employer match. Your contribution is withdrawn from your paycheck pre-tax, which means that the dollars you save are worth a whole lot more than the ones you intend to spend.

4. Sell your lousy stocks. Getting rid of that clunker of a stock can do more than make you sigh for relief -- it can offset any capital gains taxes you owe on selling your winning stocks. You can use up to $3,000 of loss on your tax return to reduce ordinary income after all your gains are offset by your losses. You can then carry over any remaining loss to future tax years. Read our articles about investing-related tax issues for more information about capital gains and losses.

5. Get entrepreneurial. Started up a jam-making business out of your home this year? Good for you (and your taxes)! You may be able to deduct business expenses related to the use of your home, including part of your mortgage interest, insurance, utilities, repairs, business furniture, and depreciation. Check with the IRS to be sure you (and your jam) are in compliance.

For more Foolishness: