Military rank
Each century was led by a centurion (centurio, traditionally translated as captain), who was assisted by a number of junior officers, such as an optio. Centuries were further broken into ten contubernia of eight soldiers each. The manipula were commanded by one of their two centurions, the cohorts by one of their three manipulum's centurions; the most senior cohort-commanding centurions was called primus pilus. The ranks of centurions in the individual cohorts were, in descending order, pilus prior, pilus posterior, princeps prior, princeps posterior, hastatus prior, and hastatus posterior. Individual soldiers were referred to as soldiers (milites) or legionaries (legionarii).

Mongol: See Mongol military tactics and organization.

Turk: There were no ranks in the modern sense of a hierarchy of titles, although the army was organized into a hierarchical command. The organization of the army was based on the decimal system, employed by Modun Chanyu. The army was built upon a squad of ten (aravt) led by an appointed chief. Ten of these would then compose a company of a hundred (zuut), also led by an appointed chief. The next unit was a regiment of a thousand (myangat) led by an appointed noyan. The largest organic unit was a ten thousand man unit (tumen) also led by an appointed noyan.

Persian: The army of ancient Persia consisted of manageable military groupings under the individual commands. Starting at the bottom, a unit of 10 was called a dathabam and was led by a dathapatis. A unit of 100 men was a satabam led by a satapatis. A unit of 1,000 was a hazarabam and was commanded by a hazarapatis. A unit of 10,000 was a baivarabam and was commanded by a baivarapatis. The Greeks called such masses of troops a myrias or myriad. Among mounted troops, an asabam was a cavalry unit led by an asapatis.
Historians have discovered the existence of the following ranks in Parthian and Sassanian armies:

Commander-in-chief: Eran spahbod (to be replaced with four spahbods, one for each frontier of the empire during the reign of Khosrau I)
Commander of the cavalry: Aspwargan salar (Parthian) or aswaran salar (Sassanian)
Commander of the archers: Tirbodh
Commander of the infantry: paygan salar
Castellan: Argbadh or argbod
Commander of a frontier march: Marzpawn (Parthian) or marzban (Sassanian)
Marzban of Central Asian marches was called kanarang

Post-classical: Post-classical militaries did not have a unified rank structure; while the feudal lords were in some ways equivalent to modern officers, they did not have a strict hierarchy—a king was conceived of as first among equals, not a monarch as later or ancient societies understood the concept, and all nobles were theoretically equals (hence "peers"). A nobleman was obligated to bring a set number of troops when asked by his liege-lord, a king or merely a higher-ranked noble who had obtained his service by the gift of land. The troops' lord retained at least nominal control over them—many  post-classical  military planning sessions involved negotiating each lord's role in the coming battle—and each lord was allowed to leave after a predetermined amount of time had passed.

High command in post-classical armies: The command structure of armies was generally loose and varied considerably. Typically, the king and high-ranking lords would call out for all lords to gather their troops for a campaign. They would appoint a renowned noble to organize the assembling forces, the marshal. The term field marshal came from the marshal then leading the army on the march, and being in charge of organizing camps and logistics. Tactics for an upcoming battle were often decided by councils of war among the nobles leading the largest forces. Outside of campaigns, the high constable had authority over the local constables, and commanders of the garrisons of major castles. The high constable might have authority in the army due to his role of head of the regular cavalry.

Origins of modern ranks: As the European and Asian Middle Ages came to an end, the rank structure of post-classical armies became more formalized. The top officers were known as commissioned officers because their rank came from a royal commission. Army commissions were usually reserved for those of high stature—the aristocracy of mainland Europe and the aristocracy and gentry of Great Britain.
The basic unit of the post-classical army was the company, a band of soldiers assigned (or raised) by a vassal lord on behalf of his lord (in later times the king himself). The vassal lord in command of the company was a commissioned officer with the rank of captain. Captain was derived from the Late Latin word capitaneus (meaning "head man" or chief).
The commissioned officer assisting the captain with command of the company was the lieutenant. Lieutenant was derived from the French language; the lieu meaning "place" as in a position; and tenant meaning "holding" as in "holding a position"; thus a "lieutenant" is somebody who holds a position in the absence of their superior. When he was not assisting the captain, the lieutenant commanded a unit called a platoon, particularly a more specialized platoon. The word is derived from the 17th-century French peloton, meaning a small ball or small detachment of men, which came from pelote, a ball.
The commissioned officer carrying the (infantry) company's flag was the ensign. The word ensign was derived from the Latin word insignia. In cavalry companies the equivalent rank was cornet. In English usage, these ranks were merged into the single rank of second lieutenant in the 19th century.
Not all officers received a commission from the king. Certain specialists were granted a warrant, certifying their expertise as craftsmen. These warrant officers assisted the commissioned officers but ranked above the non-commissioned officers (NCOs). They received their authority from superior officers rather than the king. The first NCOs were the armed servants (men-at-arms) of the aristocracy, assigned to command, organize and train the militia units raised for battle. After years of commanding a squad, an NCO could be promoted to sergeant, the highest NCO rank. While a sergeant might have commanded a squad upon promotion, he usually became a staff officer. While commissioned staff officers assisted their commander with personnel, intelligence, operations and logistics, the sergeant was a jack of all trades, concerning himself with all aspects of administration to maintain the enlisted men serving under his commander. Over time, sergeants were differentiated into many ranks as various levels of sergeants were used by the commanders of various levels of units.
A corporal commanded a squad. Squad derived from the Italian word for a "square" or "block" of soldiers. In fact, corporal was derived from the Italian caporal de squadra (head of the squad). Corporals were assisted by lancepesades. Lancepesades were veteran soldiers; lancepesade was derived from the Italian lancia spezzata meaning broken spear—the broken spear being a metaphor for combat experience, where such an occurrence was likely. The first lancepesades were simply experienced privates; who either assisted their corporal or performed the duties of a corporal themselves. It was this second function that made armies increasingly regard their lancepesades as a grade of corporal rather than a grade of private. As a result, the rank of lance corporal was derived from combining lancepesade and corporal.
As the post-classical came to an end, kings increasingly relied on professional soldiers to fill the bottom ranks of their armies instead of militiamen. Each of these professionals began their careers as a private. The private was a man who signed a private contract with the company commander, offering his services in return for pay. The money was raised through taxation; those yeomen (smallholding peasants) who did not fulfill their annual 40-day militia service paid a tax that funded professional soldiers recruited from the yeomanry. This money was handed to the company commanders from the royal treasury, with the company commanders using the money to recruit the troops.

Origins of higher ranks: As armies grew larger, composed of multiple companies, one captain was granted general (overall) authority over the field armies by the king. (National armies were the armies of the kings. Field armies were armies raised by the king to enter the battle field in preparation for major battles.) In French history, lieutenant du roi was a title borne by the officer sent with military powers to represent the king in certain provinces. A lieutenant du roi was sometimes known as a lieutenant général to distinguish him from lieutenants subordinate to mere captains. The sergeant acting as staff officer to the captain general was known as the sergeant major general. This was eventually shortened to major general, while captain general began to be addressed, depending on the military branch, as general of the infantry, general of the cavalry or general of the artillery, and these ones, over time, were shortened to simply general. This is the reason a major outranks a lieutenant, but a lieutenant general outranks a major general.