Looking to buy that high school graduate a computer for college? Maybe you can use money in that 529 college savings plan to cover the bill.

Many parents might not realize it, but Congress passed legislation in late December that made permanent a rule to treat computers and related equipment as a qualified expense in the 529 world.

Qualified means that you’re not paying taxes on any earnings or facing any penalties when you withdraw that money from a 529 to cover that specific expense.

advertisement | advertise on newsday

The computer provision also includes some computer software or Internet access. It’s key, though, that you follow the rules if you want to try this strategy.

Mark Luscombe, principal analyst of tax and accounting at Wolters Kluwer in Riverwoods, Ill., said the computer must be used primarily by the beneficiary when the student is enrolled at an eligible college, university or educational institution.

If your child is a sophomore in high school, for example, you wouldn’t want to buy that computer now and then try to withdraw money from a 529 plan to cover that bill.

If you’re buying a computer now and your child is taking a year off before attending college, consult a tax professional. Most times, it would not be considered a qualified expense.

Once you save money in a 529 plan, it’s essential to study the steps for how to spend money to make sure that your withdrawals from the plan are tax-free.

advertisement | advertise on newsday

Typically you want to take the money out of the 529 plan in the same calendar year as when the qualified higher education expenses occur.

What’s not covered? Money spent for sports activities, insurance payments, airline tickets or bus tickets to get to school and back and health club dues.

Computer equipment or software used for gaming or hobbies would not qualify.

Once you start spending money for college, make sure to keep a paper trail. Save receipts. Pay attention to withdrawals. Contact the school to find out required fees and expenses so you avoid accidentally taking a non-qualified distribution.

If the student is enrolled less than half time, the room and board expenses will not qualify.

advertisement | advertise on newsday

But tuition would be a qualified expense even if the student took one or two classes.

What if the college student lives off campus? 529 money can be used to pay for off-campus housing but the qualified expense is limited up to what the school charges for room and board on campus.