In 2026, the candidate who placed second in Brazil’s first presidential round went on to win the runoff for the first time. Where did Lula gain ground, and what local patterns accompanied his comeback? Explore these questions through election results and population data for municipalities, state capitals, states and Brazil as a whole.
Explore how votes, Lula’s margin and turnout changed between the two rounds of 2026, and compare the runoff with those of 2018 and 2022. The maps place these changes alongside income, education, religion and other population characteristics from IBGE’s 2022 Demographic Census.
The vote migration model estimates possible flows between rounds by comparing polling-section results. The Sankey diagram shows these flows adjusted to the observed totals. A separate section examines polling sections that closed after 17:10, showing where their votes were cast and comparing their results with sections that closed earlier in the same municipality.
Election results and closing times come from Brazil’s Superior Electoral Court (TSE). The maps describe patterns across areas, while the migration model presents estimated flows under stated assumptions. Understanding how individual voters changed their choices requires individual data.
5,230 / 5,571 municipalities improved Lula’s margin+1.17m margin gain in sections with stable or falling turnout
How does this adjustment work?
The question is: did the PT candidate’s margin change more or less than expected for a municipality with this profile? The model uses municipalities’ results and Census characteristics to build a reference. We then compare that reference with the change that actually occurred in the municipality.
An example: if the margin improves by 4 percentage points and the model predicted an improvement of 3, the measure is +1 point. If the improvement is 2 points, the measure is −1. A positive value means a result above the prediction. The final margin determines the municipality’s winner.
The reference accounts for population size, income, urbanisation, education and the shares of older and evangelical residents, along with the initial margin, initial turnout and state. For 2026, we compare the first round with the runoff. Historical comparisons use the runoff in the initial year and the 2026 runoff.
How the calculation works
Municipality size enters through the logarithm of Census 2022 population: this compares proportional differences in size, such as going from 10,000 to 20,000 residents or from 1 million to 2 million. The fit gives more weight to municipalities with larger comparable electorates. It is estimated separately for each election comparison and comparison basis. The measure is always the observed change minus the predicted change, in percentage points.
What can this measure tell us?
It highlights municipalities that depart from the model’s reference. Identifying the causes of that departure or individual voters’ choices requires additional data and analysis. Small municipalities may have more variable results, even after accounting for population size. The values express differences in percentage points. Assessing their statistical significance requires a separate uncertainty analysis. Census 2022 describes the local profile in that year, including when the electoral comparison starts before 2022.
How do these maps connect?
Compare the same area in both maps. The left map shows the decline in blank and null ballots, while the right shows the change in Lula’s margin over Flávio. Together with changes in turnout, the decline in blank and null ballots accounts for the change in valid votes. Use the maps to see how these changes occurred alongside shifts in the margin.
São Paulo — voting locations
Each dot marks the building where the votes were cast. Colours and, for the vote-count measure, circle sizes follow the legend below. The municipality panel keeps the results for all comparable sections, including those absent from the local map. Use “Clear selection” to return to the Brazil map.
Decline in blank/null ballots
No data / outside selected sampleExactly zero change
Change in Lula − Flávio margin
Percentage points of the same registered electorate
−100+10
Red: Lula’s relative margin improved. Blue: it worsened. Winning the municipality depends on the final margin.
Sections closing after 17:10
This section examines polling sections that closed after 17:10 Brasília time in the 2026 runoff, using their recorded closing times. The counts include every ballot cast in those sections throughout the day. The cutoff defines an exploratory group, as implementation of the court order may vary across sections.
Vote distribution in the subset
Runoff comparison — after and by 17:10
Geographic distribution
National reference — sensitivity exercise
This national exercise removes all ballots cast in the 13,356 sections that closed after 17:10 and keeps votes elsewhere unchanged, including overseas. It shows how the national totals change under that exclusion. Estimating the effect of the court decision requires a separate analysis of how voting would have unfolded under an alternative scenario.
How does this model work?
The chart explores a simple question: how might first-round voter groups have distributed themselves in the runoff? Election results show how many votes each group received in each round. Since voting is secret, individual paths need to be estimated from those totals. The model compares polling-section results to estimate those paths. Wider bands represent more voters.
Imagine a table: each row represents a first-round choice and each column a runoff choice. The model starts by estimating how many people moved from each row to each column. This initial distribution needs to be adjusted to the election results. Raking adjusts the pieces to fit: it scales the values in each row and then each column, repeating the process until the totals for both rounds match the observed results. For example, if a section recorded 60 runoff votes for Lula, the paths arriving at Lula must add up to 60. This makes the totals agree. Following individual voting paths requires data that track the same voters.
The model estimates transition rates: the estimated proportion of each first-round group (Lula, Flávio, Others, blank/null ballots, and abstention) in each runoff category. All eliminated candidates are pooled into one group, Others.
The rates come from comparisons across polling sections within the same municipality. For example, if Lula gains more in sections where Others received more first-round votes, that association contributes to estimating the flow from Others to Lula, while accounting for the other origin groups. Technically, rates are estimated by least squares, with rates between 0% and 100% that sum to 100% for each origin group. Municipalities with fewer than 50 comparable sections use rates estimated from all sections in their IBGE immediate geographic region. Each section’s flows are then adjusted by raking to reproduce the observed totals in both rounds exactly and summed for the selected area.
Limitations
The municipal or regional rate estimation assumes that sections within the same unit share the same transition rates. Raking allows each section’s flows to depart from those rates to match its observed totals. If voters from the same origin group behave differently across sections, estimates may be biased. Small groups, such as blank/null voters, may provide less information for estimating their rates. The division of Lula’s additional votes among Others, blank/null ballots, and abstention requires particular caution because it may be sensitive to the model’s assumptions. The results represent estimated flows under these assumptions. Their uncertainty remains to be quantified.
The analysis uses only comparable sections with the same number of registered voters and the same composition of aggregated sections in both rounds. It treats each section’s electorate as fixed. The people making up that electorate can change between rounds, even when the headcount stays the same.
Pavía and Romero (2024) discuss a related ecological-inference approach based on linear programming. This page combines constrained least squares with raking.
Show allocation matrix and percentages of each origin
The totals at each end are observed counts. Modelled flows are rounded, and each percentage uses its first-round group as the denominator.
How should possible vote transfers be interpreted?
Section results let us compare local patterns in candidate support, turnout and blank or null voting. For example, we can examine whether Lula gained more ground where an eliminated candidate had stronger first-round support. These comparisons describe relationships between local totals.
The same section totals can arise from different individual choices. Imagine a section with 100 voters. In the first round, Lula and Flávio each receive 40 votes, an eliminated candidate receives ten, and ten ballots are invalid. In the runoff, Lula receives 50 votes, Flávio receives 40, and ten ballots are invalid. The table shows two ways this could happen.
Trajectory
Ten eliminated-candidate voters
Ten initially invalid-ballot voters
A
Vote for Lula
Keep casting invalid ballots
B
Cast invalid ballots
Vote for Lula
Both paths give Lula ten additional votes and leave the invalid-ballot total unchanged. In path A, all ten voters who supported the eliminated candidate choose Lula. In path B, they all cast invalid ballots, while the voters who initially cast invalid ballots choose Lula. Both paths are compatible with the complete section results.
Turnout also records a net change. A fall in abstention means more people voted overall. Some may have returned to vote while others stopped participating. The accounting panel shows how net changes in turnout and blank or null ballots relate to the finalists’ combined gains.
The model on this page adds assumptions about the flows to produce estimates. Assessing those assumptions requires information beyond election totals. The local comparisons and Census adjustment here describe associations between local outcomes. The example shows how different individual choices can produce the same associations across areas.
How to read the comparisons
The 2026 comparison uses sections with the same number of registered voters and the same composition of aggregated sections in both rounds. For 2018 and 2022, the default comparison uses complete area totals. The alternative matches sections with the same code and allows electorate changes of up to 20%, with an additional sensitivity check at 10%. Areas with low matching coverage are shown with diagonal hatching. Complete totals follow the municipal boundaries in place at each election, so municipal comparisons cover areas that existed in the initial year. Haddad was the PT candidate in 2018, and the 2022 Census describes population characteristics measured after that election.
Rates for municipalities, states and Brazil are calculated by adding the relevant counts before dividing. Comparisons between election years use each election’s own registered electorate. Shares of valid votes instead use the valid-vote total for each period. The comparable national sample covers voting within Brazil, while complete national totals also include votes cast overseas.
The 2022 Census indicators use official survey weights. Average household income per person is weighted by the number of residents in occupied permanent private households. Education indicators cover people aged 25 and over, while religion indicators use valid responses from people aged 10 and over. Household indicators cover occupied permanent private households. State and national rates combine the weighted numerators and denominators.
The Census adjustment compares municipalities while accounting for log population, income per person, urbanization, university completion, the shares of older and evangelical residents, initial electoral conditions and state. The map shows the difference between the observed margin change and the model’s prediction. Boa Esperança do Norte was created after Census 2022. Including it in this comparison requires a Census profile aligned with the new municipality’s boundaries.
The maps describe results for areas. Drawing conclusions about individual choices from those results raises an ecological inference problem, because relationships across areas can differ from relationships between people (Robinson, 1950). Studying individual voting paths requires data that follow the same voters. Investigating causal mechanisms also requires a research design suited to that question. Census estimates use survey weights to represent the population, with a denominator appropriate to each indicator.