There are 2 ways you can approach this. 1. Never replace it and replace your chain and rear gears at the same time when they begin to skip. 2. Measure your chain and replace it when the gauge says to replace it.
From a financial standpoint I dont think it makes a difference which way you do it. If you choose method 1. it's probably going to wear your chainrings sooner.
As noted a properly maintained chain will last longer.