A college education is something that many parents hope they can provide for their children. But college costs are high -- Vanguard estimates the average costs at $22,180 a year now for a public, 4-year, in-state school. These costs are increasing by about 5% a year are forecasted to be $53,000 in 18 years.

This may have you wondering if funding college is even possible. This goal is achievable and probably with a lot less money than you think with the power of compound interest and time on your side. 

Person in a graduation cap and hat smiling while clapping family and friends surround her.

Image source: Getty Images.

How you can do it

If you can earn at least 10% a year on average you can accomplish this goal. And investing in SPDR S&P 500 ETF Trust (SPY -1.54%) which has an average rate of return of 10.38% since it first began trading is an example of how it can be done. If those rates continued, here's how much you would need invested in this fund at different time periods of your child's life in order to accumulate enough for college costs..

Number of Years Left Projected Yearly Cost for Public, In-State School Total Cost for Four Years
18 $53,000 $230,000
15 $46,000 $199,000
10 $36,000 $156,000

Data source: Calculations by author.

Years Until College Lump-Sum Needed
18 $39,000
15 $46,000
10 $58,000

Data Source: Calculations by author

If the lump sum is too much 

There is a chance that you do not have enough for a lump sum now but can budget for this goal annually. And if so, you could grow your accounts by contributing more frequently, but with smaller dollar amounts. You can see how much below. 

Years Until College Annual Amount Needed
18 $4,400
15 $5,600
10 $8,800

Data source: Calculations by author.

Consistency is vital, though, when doing it this way. Missing a year or two may not have a huge impact, but the more this happens, the higher the chances of you missing your target. And the closer you are to your goal, the fewer years you will have to make up any savings deficit. 

If you invest money into a fund like SPDR S&P 500 ETF Trust in a brokerage account, you may owe taxes on any of your gains. Which could mean that the gross amount you need is more than what you estimate. But you can use a savings vehicle like a 529 plan and avoid this issue. This is because it lets you take out distributions for qualified education expenses tax-free.

Time in the market matters

You should not try to sell your investment so that you can avoid losses and buy back in when you think the stock market has recovered, because this is timing the market. You should also make sure that you are not just adding money to your college savings account, but actually investing it.

The average rate of return for the noted fund is based on being fully invested during the entire time period -- making either of these mistakes could cost you big by dragging down your rate of return if you end up missing even just a few of the best stock market days. 

Consider your time horizon 

This fund has had an average rate of return that exceeds 10%. But in a year like 2008, you could have lost a significant portion of your money if you were 100% invested in this fund. And if you had accumulated $200,000 by the time your child graduated from high school, you would have seen your portfolio balance cut almost in half.

As you near the important date when you will be using the money, adding safer investments like U.S. investment-grade bonds could help lower potential losses. But if you do this, your average rate of return would likely decrease. And you may need an additional lump sum or higher annual amounts so that you could still reach the same final amount.

College is expensive, and tuition seems to rise every year. But that doesn't mean that you can't pay for your kid's college education. Instead, you can get ahead of the curve by saving and investing now for your future costs. And the earlier you start, the greater your odds of reaching your goal.