It may vary from one municipality to another but I think this is the adopted code for most places here the parking spot lines need to be 18 feet long and 9 feet wide, there needs to be 25ish feet between rows (I may be wrong on the 25 feet here but it is close to that). There are exceptions like compact car spaces but it is also stipulated like x amount per x number of total parking spaces are allowed. Sort of like the handicapped spots there are x number required per x number of spaces, Garage parking rules are different I think they have to be 10 feet wide and 20 feet long.
My truck is longer than either of those measurements. If I stick out I stick out which is every time I park in a lot as does any other vehicle that is longer the 18 feet.