For tax purposes, it’s important to distinguish between a self-employed business and a hobby (what the IRS calls a not-for-profit activity). If it is a hobby, you cannot use losses from it to offset income on your taxes. The IRS looks at several factors to determine if an activity is a business and not a hobby, including whether you:
operate in a businesslike manner,
depend on the income for your livelihood,
make a profit in 3 out of 5 years.
See the full hobby vs. business test outlined in IRS Publication 535. 4