The City of Berkeley is currently updating their accessory dwelling codes and height is an issue that is being reviewed. Many cities struggle with this. This is a summary of what you get for 14′ vs. 18′
To calculate the maximum height you measure the height of a building from the soil to the peak of the roof.
An 18′ tall design the foundation is 1 foot, the first floor is 8 feet, a second floor is 7 feet, the floor between the two is 1 foot and the roof is 1 foot. That adds up to 18′ total. You get a decent second floor with a 7 foot height at the peak in this design.
Adding a second floor can cut the per square foot construction cost in half – from $500 per square foot to $250 per square foot. That per square foot cost is how construction is measured and it is one of the best ways to create valuable usable space affordably.