The Roman Legions and the Greek Phalanx were two prominent ancient military formations. Both had their own sets of pros and cons. They did meet in two well documented battles, but first to clear out some issues.
- When they fought, it was during the Second and Third Macedon Wars. The traditional Greek City states had lost much of their power and influence. In fact Sparta had become a tiny player, who could barely muster 500 hoplites.
- The Romans had started using the Maniple legion. While I do believe the Marian and Imperial Legions were far superior, this was the formation in place at the time.
- The main power on the Greek peninusla was Macedonia. Their Phalanx was different from the conventional ones. The infantry carried longer spears (16-20 feet), and had smaller shields than their Greek counterparts. In terms of raw power, they were far stronger than the Greek city-states phalanxes, owing to doubling the spear length.

It would be 100% speculative to imagine say an Athenian or Spartan Phalanx going up against a similar sized Roman Imperial Legion, as the never met. For this purpose, we have documented evidence of the Macedonian Phalanx meeting the Maniple Legion. Both have similar traits to the other variants, and could give us a more general idea of how the other systems would fare against each other.
For information on the Maniple or Polybian Legion, you can see my other blog post on the same. For the Macedonian Phalanx was created by Phillip of Macedon. Under him and Alexander the Great, it was a key component of the Macedonian expansion.
In the end, both sets of formations did help forge empires. Alexander the Great, using his Phalanx as an anvil forged a large empire in a matter of years (its another matter how it all crumbled so quickly). The Roman Legion helped it secure dominance over the Mediterranean and Western Europe and remained a powerhouse for centuries.

When they met, it was well after Alexander’s time. Rome had just finished its bloody Second Punic War with Carthage and Macedon wanted to expand itself. The two battles which form the reference are Cynoscephalae and Pydna. Both pitted the two formations against each other.
The Documented Battles
Now at Cynoscephalae, Titus Quinctius Flaminius had chased the Phillip V’s Macedon forces out of the lands of the Aetolian League. The engagement at Cynoscephalae was over a hill with both forces on either side of it. When they vied control of the hill, both commanders decided to unleash their forces. With their cavalry and skirmishers committed, the Macedonians took the upper hand and attacked. Phillip then committed half of his phalanx to attack over the hill, whist the other half was still forming up. It was a battle of two halves of a sort. The Macedonians pushed the Roman left wing (which was fighting in effective order and not breaking), while the Roman right wing defeated the Macedonian left, which was yet to form. A tribune then took 2000 men, and attacked the other Phalanx from the rear. The Phalanx, which cannot fight in multiple directions was slaughtered. Many Macedonians raised their Sarissa (spears), their sign of surrender which was either unknown or ignored by the Romans who gloriously slaughtered them.

The next battle was at Pydna. It was during the Third Macedon War. At the battle of Pydna, the Macedonians and Romans faced off. They both were arrayed in a typical manner, with the legions and phalanx occupying their respective centres. While once again the Phalanx pushed the Romans, moment they reached the hills (behind the Roman Camp), the Phalanx lost its effectiveness. Moving in from the side, the Romans were more effective in close combat and took the field. In fact, the Macedonian King, Persues just fled without ever engaging with his cavalry. After this, Macedonian power was shattered permanently, and by that the Greek peninsula was effectively under Roman rule (yeah there were 2 smaller wars, but they were not comparable in size and scale, and the Romans won those with ease).

Verdict
Now, do these documented battles prove that the Legion was superior to the Phalanx? In my opinion yes.
If you love the Phalanx, you would argue but the Romans were pushed back, oh they fought over uneven terrain. However, it does not change the outcome of the results. In fact, the Romans themselves used to use the Phalanx during their initial years. They switched to the legion, when they realised the system could not let them fight on uneven terrain.
At the same time, the Legion is far more flexible. It allows individual officers to make decisions on the spots. At Cynoscephalae, it was the initiative of a tribune who is unknown to us, to take 2000 men and attack the Phalanx from the rear. This also highlighted a major flaw of the unit. In the direction of attack, it is unstoppable. But a flexible opponent or routing of the Phalanx’s wing protection will expose them. Without any support, the Phalanx can be defeated by attacking it from the sides and rear.
Another couple of issues with it. Phalanxes took a long time to assemble. At Cynoscephalae, only half of the Phalanx was marshalled in time, whilst the other half was attacked unprepared. The legions of Rome had been fully marshalled by then. Also, the Phalanx was really manpower intensive. It was an all or nothing attack, as it required all available manpower. The Romans by contrast, kept their third lines in reserve. These men, could then be ordered to whatever area that was needed, and help turn the tide.
While the Phalanx can be unstoppable with a lot of conditions working in its favour, the more flexible legion had chances of winning in different terrain and scenarios. This flexibility allowed Rome to create and maintain a large empire for centuries.
This is why, I believe the legion in any form (Maniple, Marian, and Imperial) would beat any Phalanx, owing to the flexibility that was built into its structure.