This ultimately depends on your definition of 'worth it'. The primary reason to do a PhD is to do research. If you know you want to do research (here defined as high-impact work publishable in top journals) as a career, then a PhD is probably a good move. I've worked across a few industry research labs, and 95% of the folks have PhDs. There are some exceptions (one of the best researchers I know, with some of the highest cited papers in the field, has a BA in music from a no-name Canadian university), but by and large getting a PhD is the most direct path to a research career.
If your definition of 'worth it' is purely financial, then you are probably better off hitting the job market with a BS or a Masters.
If your definition of 'worth it' is purely financial, then you are probably better off hitting the job market with a BS or a Masters.