There are tables which calculate that item. It depends on the number of apartments, the average occupancy per apartment, and the number of bathrooms in the unit, etc.. The more units the less the heater size has to be increased for each additional unit, but you have to allow enough storage to cope with the morning and after work peak usages. Often you will find that a storage tank and separate heater will be more economical than one large or several small heaters. : How would you determine the size of the hot water tank needed in a commercial and residential building?