This may give you a good idea of just how much you can expect out of that 401(k) contribution:
If you invest a recurring principal p on a yearly basis into an account with an (r-1)*100% APY (e.g. r=1.05 for a 5% APY), your return after y years is: p * (r^(y+1) – r) / (r – 1).
(For y >= 1, since we’re starting at the first compounding).
So if you put $5k a year into a 401(k) with 3% interest, you’ll have $59038 by the end of the 10th year, vs. the $50000 you’d have without interest.
After 20 years, you’d have $138,382, vs $100,000.
If you contributed $10,000 per year for 20 years, you’d end up with $276,764, vs. $200,000.
Worth it? You decide. But that shocking “you’ll have a $500k nest egg after 30 years” claim, while true, is only true because it’s counting the principal you’re investing.
Granted, locking it away does remove the temptation to spend it.