Got a vacation home? There’s a big tax break if you rent it out—but a potential hit if you sell.

First, the break: Long-standing rules allow owners of vacation homes to rent out their cottages or condos, pocket the rent checks and completely sidestep taxes on the rental income.

I’ll use owner Olivia to illustrate how the rules work. Olivia qualifies for the rental-income exclusion only if she satisfies this seemingly-straightforward requirement: Rent out her place for less than 15 days during the year.

Olivia shouldn’t be complacent about the frequently-misunderstood rules; things end badly if she ignores the calendar and goes beyond the less-than-15-days limitation. She can’t claim the break and has to report all the rental income on Form 1040’s Schedule E.