The flag of Brazil is similar in ideology to the flag of the United States of America - in both cases, the number of stars corresponds to the number of states, federal units. The flag of the United States has been changed 27 times since its inception, starting with 13 stars and stopping at 50 when the Hawaiian Islands were included in 1959. After the proclamation of the Republic of Brazil, Rui Barbosa proposed a version of the flag largely inspired by the flag of the United States. Even the number of stripes on the flag was 13, just like on the American flag, only there it was not done by chance and the first flag had 13 stars and 13 stripes, while the Brazilian flag had 21 stars and 13 unexplained stripes.

However, the flag did not last long, it was raised only for a few days from November 15 to 19, 1889, after which the interim president of Brazil vetoed it because of its strong resemblance to the US flag. For example, the flag of the United States in the period from 1819 to 1820 during the annexation of Illinois also consisted of 21 stars and one can clearly see the similarities in the flags.

The Brazilian flag has not changed as often as the American flag, only 4 times. The first iteration of the 21-star flag was adopted in 1889, and the stars corresponded to the following federative units: Amazonas, Mato Grosso, Pará, Piauí, Maranhão, Ceará, Alagoas, Sergipe, Paraíba, Rio Grande do Norte, Pernambuco, São Paulo, Rio de Janeiro, Bahia, Minas Gerais, Espírito Santo, Rio Grande do Sul, Santa Catarina, Paraná, Goiás, Distrito Federal.
In 1960, a new star appeared, corresponding to the state of Guanabara. The state was named after the Bay of Guanabara, and in 1975 it was merged with the state of Rio de Janeiro. Thus, the state of Guanabara was liquidated in 1975, but the star was not removed from the flag and until 1979, for 4 years, the star did not represent any state. Only in 1979 was the star assigned to the state of Mato Grosso do Sul.
In 1962, the state of Acre was created, and in 1968 a star was added to the flag. Acre is a state in western Brazil. It borders the states of Amazonas and Rondônia to the north and east, and Bolivia and Peru to the south and west. The state produces 0.2% of Brazil's GDP and has a significant rubber industry, and the state's population is only 0.42% of the total population of Brazil.

On May 11, 1992, the flag of Brazil took its final form, which is now more than 30 years old and consists of 27 stars. This year, 4 more stars were added in honor of the following states: Amapá, Rondônia, Roraima, Tocantins.