In the digital era, it’s never been easier to start a business on the side, whether as a freelance social media consultant, mobile game developer or Etsy shop owner.

But let’s say you started a business and it didn’t make any money. That might be bad news for your wallet, but could potentially help you come tax time.

The IRS lets you write off the loss from a business on your personal tax return. For example, if you have a regular “day” job, you can use the loss from a side business to offset your W2 or other income (and thus, lower your overall tax bill for the year).

Does this mean you should go through the effort of creating a business just so you can take $10,000 (or whatever figure) from your personal earnings? Probably not. And does that mean you can get away with creating a shell of a company just to get a deduction? No. But if you have an entrepreneurial inkling, then starting a side business is not just exciting; it could also be advantageous tax-wise. And who knows, maybe your side business will turn into a full-time gig some day.

If you have a side business or are toying with the idea, here’s what you need to know in order to properly record a loss. As with any article on personal finances and taxes, these are general guidelines. It’s always prudent to speak with a CPA or tax advisor about your own specific situation.

A Profit Motive

If you like attending industry events or taking your friends out to dinner and expensing the costs, that alone won’t qualify as a business. The IRS requires you start a business with the intention of making a profit.

More specifically, if an activity makes a profit three years out of every five, the IRS will presume you’re in business to make a profit (the criteria is two years out of seven, if you’re involved in horse breeding. #history).

Keep in mind that the IRS uses subjective standards to determine whether something qualifies as profit motive; certainly there are legitimate businesses that incur losses for many years in a row. This is something to discuss with a tax advisor.

Show You’re Serious

Help make your case to the IRS that your side business is more significant than a hobby. For example, write up a business plan and keep it current. Keep detailed financial records for all income and expenses related to the business (this is a must, anyway). Open a separate bank account for your business. In addition, you should be able to show that you’re devoting substantial time and effort to the business.

Pick a Business Structure

Your business’ legal entity (i.e., sole proprietorship, LLC, S Corporation) won’t impact your ability to write off the losses. You can stay as the simplest entity, a sole proprietorship (with a DBA, to use a business name), and still take a loss on your personal tax return. Likewise, you can incorporate your business or form an LLC, and you’ll still be able to take a loss.

There are a few things to keep in mind, however. You may want to form an LLC or incorporate the side business in order to separate it from your personal finances. You don’t want your personal savings (and main salary) to be on the hook, should something happen with the side business.

In addition, if you’re starting the business with a partner or two, be aware that the S Corporation structure doesn’t give you any flexibility in how you take your losses; each owner must take a loss or gain on his personal income tax, proportional to how much of the business he owns. If you want any flexibility in how you allocate the losses, the LLC is a better choice in business structure.

If you’ve got a hobby, talent or idea that you’re ready to turn into a business, this might be the time. You can still keep your day job, and even enjoy a tax write-off, while making your own mark on the world. Just be sure to play by the rules and take your legal obligations seriously.

Editor’s Note: This was originally written by Nellie Akalp for Mashable.