The Ley d’Hondt It is a complex mathematical formula that distributes the seats within a constituency proportionally.
In order to be part of this distribution, and according to the Spanish electoral law for the general elections, the Loreg, the candidacies must have obtained at least 3% of the total vote in said demarcation. If they do not reach it, they are excluded.
In Spain, the 350 seats in Congress are distributed proportionally, applying this law. Each of the 50 provinces represents a constituency, which is assigned a minimum of two deputies. Ceuta and Melilla each choose one. The remaining 248 seats are fixed in proportion to the entitlement population.

Who devised this system?
Victor d’Hondt (1841-1901), Belgian jurist who created this method of allocating seats with the aim of making it as proportional as possible and whose last name gives its name to the formula.
Where is d’Hondt’s Law used?
In addition to Spain, it is used by other countries such as Argentina, France, Belgium, Finland, Ireland, Israel or Japan.
How does it work?
After finishing the voting and the recount, the seats are distributed following the d’Hondt system. The total number of votes obtained by each party is divided by the number of seats that are distributed in the province, that is, the total number of votes of each formation is divided by 2, by 3, by 4, by 5 and so on until get to the number of seats.
Once this division is made, the seats are awarded to the highest quotients in descending order.

Criticism of the d’Hondt Law: Is it a proportional system?
The d’Hondt system has been accused on many occasions of not being as proportional as its creator intended. But this problem is more of the constituencies than of the system itself.
In Madrid, each deputy costs around 100,000 votes, while in Ávila, Teruel or Soria, the same seat is obtained with less than 20,000 votes. The distribution of seats gives priority to less populated areas.
Thus, it may be the case that parties with more than 200,000 votes in the national total may be left out of Congress, and others, with the same support concentrated in a few provinces, may obtain a parliamentary group.