Despite its popularity, the United Nations' Human Development Index (HDI) only addresses simplistically, if at all, issues of inequality, intended either across dimensions or across units (or both). To overcome this problem, the weighted arithmetic average can be replaced, in the aggregation steps, by more sophisticated non-linear functions, often given by suitable generalised means, that impose penalizations for inequalities; this is done (more or less explicitly) in the literature, as well as in the 2010 edition of the Human Development Report (HDR). Besides other basic properties that aggregation functions are expected to satisfy, the following additional two appear relevant: the function must be defined for every set of values of variables (including high or negative), and the compensability among variables must be incomplete. Furthermore, a choice must be allowed among three different kinds of penalisations: one that only depends on the differences of variables (called "constant penalisation" here); one that, for given such differences, increases–and one that decreases–when the absolute levels of variables increase. These features were not discussed previously in the literature and are not fulfilled, for instance, by the Inequality Adjusted HDI of the 2010 HDR. Nevertheless, these features do hold for a suitable explicit generalised mean introduced here. Such an aggregation function is then applied to a database of 32 developing or developed countries, thereby resulting in significant rating and ranking variations with respect to the HDI, especially in the non-constant penalisation cases. Moreover, there is a negative correlation between the HDI and the penalisation value (that can be regarded as a penalization index in itself), both in terms of rating and ranking.