I get this question a lot, so i'll just write it out.
I went to b-school at 28, which is close enough. Most people asking this question are really asking: can i shortcut into a higher-paying track without doing 3 years of grinding entry-level roles. The honest answer is: sometimes, but not automatically.
For data science specifically, an MS actually has a pretty clear ROI story right now. Top-15 programs (CMU MCDS, Columbia, UW, UCLA, Michigan) have strong placement pipelines into DS/MLE roles at tech companies, consulting firms, and banks. Entry-level offers for MS DS grads at decent programs are landing somewhere in the $130k-$165k base range in 2026 for roles in SF/NYC/Seattle. That's materially higher than what most people can get as an analyst without the credential.
BUT here's where it gets complicated. The credential only works at programs with recruiting pipelines. Some MS programs are just expensive bootcamps. Do the work of looking at actual grad placements (not school-provided stats, which are self-reported). LinkedIn alumni search by graduating class is more honest. At 27 with no industry experience, you will likely enter as a junior analyst or associate regardless of the MS. The degree gets you in the room; it doesn't auto-level you up. If you already have 2-3 years of data-adjacent experience (analyst, BI, data eng), the MS is much more compelling because you can actually position the technical depth you gain. Without that, the ROI is murkier. The opportunity cost is real. 18-24 months of lost income plus $60-90k tuition at most programs. You need the post-degree income bump to be large enough AND last long enough to cover that.
My actual take: if you're pivoting from a non-technical field and want to break into DS/ML, a good MS is probably the most reliable path in 2026 because the self-taught routes have gotten harder to get through the ATS filter. If you're already adjacent and just want to level up, I'd try for 6-12 months of internal moves or project work before committing to tuition.