Next to buying a home, paying for college has become the largest investment for many families.

One of the best ways to save for college is in a 529 savings plan, which allows your money to grow tax-free. And if the funds are used for qualified educational expenses, earnings are not taxed at the federal and, in most cases, state level.

The chances of your child getting a free ride to college are almost zilch

Recently I invited an expert on 529s to address reader questions during my weekly online discussion. Mark Kantrowitz, the publisher and vice president of research for savingforcollege.com, had this to say to those trying to save for their children’s future.

Q: My spouse and I are planning to have our first child soon and are also looking for ways to reduce our tax liability this year. Would starting a 529 now in one of our names be a good option for us?

Kantrowitz: I started saving for my children's college education before my children were born. If you start saving for college before the child is born, it will give you more time for interest to compound and the savings to grow. Starting to save for college before the baby is born gives you the opportunity to solicit contributions to the baby's college savings plan during a baby shower.

Assuming a 5 percent average annual return on investment and $250 monthly contributions, the family will accumulate $80,465 (36.6 percent from earnings) over 17 years, $87,664 (38.4 percent from earnings) over 18 years, $95,232 (40.1 percent from earnings) over 19 years and $103,187 (41.9 percent from earnings) over 20 years.

You can start saving for a child's college education before the child is born by listing yourself as the beneficiary of the 529 plan. After the child is born and has a Social Security number, you can change the beneficiary to the child.

I have two boys -- a 7-year-old and a 2-year-old. Saving for college hasn’t been a priority because we’ve been pouring all our extra money into day-care expenses. We intend to save aggressively once day care ends. Would you save the same amount for both kids, or would you front-load the older boy’s account?

Kantrowitz: It is best to start saving for college, even if just a little, as soon as possible, and to set up an automatic investment program that transfers the money to your 529 plan. That way, you get used to the idea of saving for college. Later on, when expenses like diapers and daycare end, you can redirect the money you were previously spending toward their 529 plans.

How to afford college without student loan debt

You can benchmark your annual progress in saving for your children's education by multiplying their ages by $3,000 each, assuming they will enroll in an in-state public college.

You might want to make a lump-sum contribution to each child's 529 plan equal to the shortfall. If you don't have enough for both children, you are going to have to decide how to split up your savings. Generally, you should save more for the older child because you have less time to catch him up.

We are interested in sending our kids to Catholic school. Can we use the accounts to help reduce the tuition burden while still saving for college?

Kantrowitz: The Tax Cuts and Jobs Act of 2017 added K-12 tuition, up to $10,000 per beneficiary per year, as a qualified expense for 529 plans. Thus, you can use money in a 529 plan to help pay for private elementary and secondary schools, including private religious schools. However, check with your state, as several states do not consider K-12 tuition to be a qualified expense at the state level. This can lead to state income taxes when you use a 529 plan for K-12 tuition.

Debunking the myths about college financial aid

Also, consider that money in a 529 plan does not have as much time to appreciate in value when it is used to pay for tuition. It is best to use a 529 plan to save for college, not for K-12.

Students who graduate from a private high school are more likely to enroll in a private college. They are also more likely to win scholarships. Some parents incorrectly believe that if they pay for private K-12, their child will win more scholarships to pay for college. But the average increase in scholarships is only about $1,000, which does not come close to covering the cost of a college education.