The Gini coefficient is the most popular measure of income inequality. The formula taking into account the weights of income \(w_1,w_2,...,w_n\) is given by:
$$G_w = \frac{\sum_{i=1}^nw_i\sum_{j=1}^n w_j|x_i-x_j|}{2(\sum_{i=1}^nw_i)^2\mu_w},$$
where \(x_i,x_j\) are incomes of individuals \(i\) and \(j\), respectively, \(n\) is the number of individuals, \(\mu_w\) is the mean income. The Gini coefficient ranges between 1 (perfect equality) and 1 (perfect inequality).