In the Gettysburg campaign, the "average" Confederate regiment consisted of 32 officers, 338 enlisted men and 18 slaves, based on my calculations. My rule of thumb is to regard 14 percent of the enlisted men as non-combatants, and excluding an additional average of 3 percent sick, the same regiment entered the battle with roughly 26 officers and 278 enlisted men. A line of battle typically being two ranks, and allotting 22 inches per enlisted man (as a rule of thumb that I found works fairly well for known examples) yields a battle frontage of 255 feet.
On the march during the same campaign, when battle was not imminent, a regiment typically marched in a column of "4s" (four men abreast) well-closed up and with an estimated two feet of separation plus one foot width allotted per soldier would extend nearly 250 feet in length, excluding the 3 percent sick who rode in the ambulances and the slaves who followed in the rear. Not counted are the four or five wagons for baggage/provisions and one or two ambulances assigned to the regiment, which were usually grouped in the brigade wagon train.
Here I have omitted mention of a few details for the sake of simplicity. For instance, the sergeant major, bugler and drummer were enlisted men who did not carry weapons and were typically not in the ranks either in battle or on the march. By the way, some officers were likewise non-combatants: surgeon, assistant surgeon, quartermaster, commissary officer and some detailed staff officers.