Finding this information for WW2 isn't too difficult but for WW1, it seems to be a bit tougher.
An American infantry company operating under the "Series A" Tables of Organization and Equipment approved on January 14, 1918 (these tables were a slight tweak of the Series A tables that had been in use since August 8, 1917, just as American boots set foot on French soil) was organized as follows. Each platoon had a headquarters and four "sections" or squads, for a total of one officer and 58 men. Four platoons and a headquarters made up a company, that had a total of six officers and 250 men. The U.S. Army Center of Military History publication United States in the World War 1917-1919: Volume 1, Organization of the American Expeditionary Forces (PDF warning) has more information, including all of the post-January 14, 1918 Series A tables used by American forces.
Company Headquarters:
Men:
| Quantity | Rank |
|---|---|
| 1 | Captain |
| 1a | First Lieutenants |
| 1p | First Sergeants |
| 1r | Mess Sergeants |
| 1r | Supply Sergeants |
| 1gr | Corporals |
| 4p | Cooks |
| 4r | Mechanics |
| 5k | Wagoners |
| 2p | Buglers |
| 4ir | Privates, 1st Class |
Equipment:
| Equipment | Quantity |
|---|---|
| Mules, draft | 15kx |
| Carts, ration, 2 mule | 1k |
| Carts, water, 1 mule | 1k |
| Kitchens, rolling, 4 mule | 1k |
| Wagons, combat, 4 mule | 1k |
| Wagons, ration and baggage, 4 mule | 1k |
| Bicycles | 2 |
| Grenade-dischargers, rifle | 6e |
| Knives, trench | 40d |
| Pistols | 9 |
| Rifles | 19L |
Four Platoons; in each platoon:
Platoon Headquarters:
Men:
| Quantity | Rank |
|---|---|
| 1b | First Lieutenants |
| 1cpr | Sergeants |
| 4sr | Privates |
Equipment:
| Equipment | Quantity |
|---|---|
| Pistols | 2 |
| Rifles | 5 |
1st Section (Hand Bombers):^n
Men:
| Quantity | Rank |
|---|---|
| 2pr | Corporals |
| 4 (1r, 3pr) | Privates, 1st Class |
| 6r | Privates |
Equipment:
| Equipment | Quantity |
|---|---|
| Pistols | 5 |
| Rifles | 12 |
2nd Section (Rifle Grenadiers):^o
Men:
| Quantity | Rank |
|---|---|
| 2pr | Corporals |
| 1r | Privates, 1st Class |
| 6r | Privates |
Equipment:
| Equipment | Quantity |
|---|---|
| Grenade-dischargers, rifle | 6 |
| Pistols | 2 |
| Rifles | 9 |
3rd Section (Riflemen):
Men:
| Quantity | Rank |
|---|---|
| 1r | Sergeants |
| 2r | Corporals |
| 6r | Privates, 1st Class |
| 8r | Privates |
Equipment:
| Equipment | Quantity |
|---|---|
| Rifles | 17 |
4th Section (Automatic Riflemen):^mt
Men:
| Quantity | Rank |
|---|---|
| 1pr | Sergeants |
| 2pr | Corporals |
| 4fp | Privates, 1st Class |
| 8r | Privates |
Equipment:
| Equipment | Quantity |
|---|---|
| Pistols | 7 |
| Rifles | 11 |
| Rifles, automatic | 4t |
Notes:
| Note | Explanation |
|---|---|
| a | Senior first Lieutenant, second in command |
| b | 1st and 4th Platoons commanded by first Lieutenants, 2nd and 3rd Platoons commanded by second Lieutenants. Additional officers in Regular Army from Reserve Corps or National Army |
| c | Assistant to platoon commander |
| d | To be distributed as needed |
| e | For replacement |
| f | Automatic-rifle gunners |
| g | Company clerk |
| i | Company agents and signalmen |
| k | From supply company, not included in total |
| L | Includes 8 rifles for automatic gunners not acting as such |
| m | 4 automatic rifle teams, each consisting of 1 gunner and 2 carriers; 1 Corporal for each 2 guns |
| n | 3 bomber squads, each consisting of; 1 leader, 1 thrower, 1 carrier, and 1 scout (3 pistols for throwers) |
| o | 6 rifle grenadiers and 3 carriers |
| p | Armed with pistols only |
| pr | Armed with pistol and rifle |
| r | Armed with rifle only |
| s | Runners |
| t | 2 automatic rifles per platoon (8 per company) ordinarily held as a company reserve, in which case corresponding automatic rifle teams are used as riflemen |
| x | Animals not furnished until further orders |