What should your class rank be around to get into colleges like MIT?

My class rank is 25 and my school size is 648. Is that good enough to get into the Ivies, Harvard and other top schools like MIT?

No. Maybe if you started a company and win a lot of national math competitions.
I was #2 of 300 and got denied from all of those places. My friend got into Yale with worse test scores and GPA. Rank doesn’t matter.
Why is this under UC Berkeley?

Wow. Yeah I accidentally put this under UC berkeley. So how bad were your friend’s scores? Can you tell me his approximate GPA and scores.

25 out of 648 puts you in the top 5% which puts you in the ball game. That however is just one piece of the puzzle. Have you taken the most rigorous set of courses at your school (e.g. AP/Honors courses in subjects you took; math, science, english, foreign language each year)? Your test scores, SAT or ACT (and to a lesser extent for some schools, SAT 2’s) will be the other objective stat that determines whether your application will get a serious look in most cases. For the most selective schools, you are looking at least mid to high1400’s and 31/32+. Even with great objective stat’s, these schools are a reach for anyone – plenty of 4.0 (UW) 1600/36 students get rejected. The top schools are selecting out of a group of 10/15 thousand, perhaps more of applicants with qualifying objective stat’s. So once you make that cut, it comes down to how persuasive you are in your essays, LoR’s and EC’s that you should have one of the limited spots (around 2000 for most of the Ivies).

oh so if you are in the top 5%, that is considered good enough rank wise?

Almost everyone applying will be at or near the top of their class. You need to do something to make yourself stand out.

Top 5% makes you competitive for that narrow stat, assuming course rigor is also high for your school. So let’s say you have a 4.0 (UW) but you took “regular” and not “honors” or AP math, science, English, etc… when more advanced courses were available to you. The top 5% is no longer looking so good. Assume your rigor is as tough as you can get, look at the rest of my post on what it will take to be competitive, and then it will still be a reach.

It also depends upon whether you have a “hook”, such as being URM, a great athlete, or child of a MAJOR donor. With this, you may have a decent chance. Otherwise, being 25th out of 648 is really not MIT or Harvard or Stanford level. Whether this is sufficient for Brown I am not sure.

The good news of course is that there are a LOT of very good universities in the US, and you don’t need to go to an Ivy League or equivalent school to do very well.