An HMO can be a whole building or a part of a building (for example a block of flats might not be an HMO, but one of the flats within the block could be an HMO) [s254(1) HA2004]
It is perhaps surprising how many buildings or parts of buildings are now HMOs, however not so many at the moment require a licence. It is perhaps easier to start with what is not an HMO. Properties that can not be an HMO are contained in Schedule 14 to the Housing Act 2004.
The most important exclusion is two persons sharing a house or flat is not an HMO [sch14(7) HA2004].
The next important one is that a building occupied by an owner has limited exclusion. The owners household (direct family) is excluded plus another 2 persons are excluded. Example: If you owned and occupied a house and had 3 persons sharing, then the property would be an HMO. However, if you only had two sharers, it would not be an HMO.
Other exclusions include buildings managed by public sector bodies, buildings operated by universities etc. and buildings occupied by religious communities.
Now onto the definition of an HMO.