He was born in 1842/43 (2 (18 in 1861), 5 (18 in 1861)).
He enlisted and was mustered into service on 16 November 1861 or 17 November 1861 (1 (16 James, 17 William), 2 (16 James), 5 (17 William)). He enlisted at Philadelphia, Pennsylvania (2, 5). He was mustered in as a private, at Philadelphia, Pennsylvania (2, 5). He was a private in company B (1, 3).
He was dropped from the rolls as a deserter, on 30 June 1862 (1 (William), 5).
I have assumed that William and James Carpenter are the same person, based on the index to the compiled service records (see source 4 below). Note that James was not on the muster-out roll, while William was dropped as a deserter.
1 Bates, Samuel Penniman. History of Pennsylvania volunteers, 1861-5. Harrisburg: B. Singerly, state printer, 1869-71. 5 volumes. 'Ninety-first regiment', volume 3, pages 186-233. (In the roster) (James Carpenter and William Carpenter)
2 Civil War Veterans' Card File, available at the Pennsylvania State Archives, searched 28 June 2004 (James Carpenter)
3 index to compiled service records of volunteer Union soldiers who served in organizations from the state of Pennsylvania (James Carpenter)
4 index to compiled service records of volunteer Union soldiers who served in organizations from the state of Pennsylvania (William Carpenter)
5 Civil War Veterans' Card File, available at the Pennsylvania State Archives, searched 27 June 2004 (William Carpenter)