Can I go from Masters to PhD in 2 years?

I want a PhD in Computer Engineering and was wondering if I can get a Masters at a cheap State school then get into a PhD program at another school and finish in 2 years.

Or do I have to do the whole 4 years after my Masters?

There are no short cuts to a Ph.D. And if you are paying for a Ph.D. in engineering you are doing it wrong.

EDIT: According to your other thread you appear to be a high school senior.

You should excel at undergrad engineering so your advisor will write a stellar PhD recommendation for you. Skip the masters which you would normally get if you don’t complete the PhD, which would normally be paid for by the school (in exchange for your slave labor).

No.

PhDs are not a thing that is timeboxed, really; when people say that it takes 5-7 years to finish a PhD, they are generally talking about averages. OR sometimes they mention how long the program is designed to take, but there’s a lot of variation. For example, my PhD program (the psychology half) was designed to take 5 years, but out of my cohort of 12, at least half of us took 6. One took 4 years, and I believe a few took 5. (In the public health half, though, I was the second one in my cohort to finish. Everyone else took 7+ years.)

Note that the average time to degree for engineering PhD programs is 6.7 years. Most engineering students will probably take around 5-7 years to finish; 4 years would be pretty quick. Two years is generally not possible; it takes you that long just to finish your coursework.

Moreover, PhDs aren’t meant to be a sprint. You’re developing expertise and skills to function as an independent researcher, and that takes time. Furthermore, it takes time to build the kind of resume/CV that you need to be competitive for research jobs post-PhD. If you rush through in two years, you will almost inevitably have fewer publications than the person who took 5 to finish, but you’ll be competing for the same roles.