As others have mentioned, it depends on the circumstances.So two pilots flying a C172 together can both log the whole flight as PIC in the US?
In a 172 and similar aircraft, if person A is fulfilling the role of 'person exercising responsibility and authority for the conduct of the flight' (aka, "acting as PIC"), and person B is logging PIC time as sole manipulator of the controls of an aircraft for which he/she is rated, then only person B can log PIC time unless the rules that the flight is operated under require more than one pilot. The only example that I can recall that would apply to a 172 is when person B is under the hood with person A acting as safety pilot, on the conditions that person A can only log PIC time if he/she is qualified to act as PIC on that flight, and the persons involved agree that person A is the one who is acting as pilot-in-command. (If those conditions are not met, then the safety pilot can only log SIC time.)
That's both weird and interesting — thanks!
That describes the FAA perfectly!
But I assume they're still only one actual PIC for each flight who's responsible for it.
Generally true, although as others have noted, the FAA always reserves the right to reclassify responsibilities after the flight if a violation occurs, especially if one of the pilots is a CFI. (Due process? What due process! )