How our election calculations are performed, why each method was chosen, and what the numbers mean. Published in the interest of transparency.
Data Source
All election results displayed on this tool are official certified results published by the Montgomery County Board of Elections following each general election. Results are loaded directly from ArcGIS Online (AGOL) hosted feature tables maintained by the Montgomery County GIS & Mapping Services department.
Each year's results are stored in a separate hosted table and updated once after certification. No manual edits or transformations are applied to the vote counts — the numbers displayed are exactly as published.
Available election years2020, 2021, 2022, 2023, 2024, 2025 General Elections.
DEM% and REP% — Two-Party Vote Share
All Democratic and Republican percentage figures on this page use two-party vote share. This is the standard method used in electoral analysis and political science reporting.
Source fieldsTwo fields from the AGOL hosted results table drive every DEM% and REP% calculation on the page:
| Field | Description |
|---|---|
Party_Code | Party affiliation of the candidate row — values include DEM, REP, and others |
total_votes | Total votes for that candidate in that precinct (all ballot types combined) |
For each selected race, all rows where Party_Code = 'DEM' are summed across every precinct to produce a county-wide DEM total. The same is done for REP. This happens for both the county-level swing card and the municipality table (where the sum is per municipality rather than county-wide).
DEM% + REP% always equals 100%, making year-over-year comparison direct and consistent.
Why total_votes and not a ballot-type specific field?total_votes is the sum of Election Day votes + Mail-in votes + Provisional votes for that candidate in that precinct. Using it for DEM%/REP% ensures every ballot type is included in the partisan comparison regardless of which vote type filter the user has selected. Vote-type breakdowns in the breakdown chart use the individual fields (Election_Day_votes, Mail_in_votes, Provisional_votes) separately.
If a significant third-party candidate runs in one election year but not another, the DEM and REP percentages would appear to shift even if their actual vote counts were identical. Two-party share removes this distortion by focusing on the head-to-head comparison. This is particularly important when comparing Presidential years (with more minor party activity) to off-year elections.
Where two-party share applies| Chart | Uses two-party share? | Notes |
|---|---|---|
| Year card candidate bars | No | Shows all candidates — uses share of all votes so bars sum to 100% |
| Swing card DEM%/REP% | Yes | County-wide, summed across all precincts |
| Vote type breakdown | Yes | Two-party share per vote type using type-specific fields |
| Municipality table DEM%/REP% | Yes | Two-party share per municipality |
Swing
Swing measures how much a party's two-party vote share changed between the two selected election years, expressed in percentage points (pp).
A positive swing means the party gained share in that geography between the two elections. A negative swing means it lost share.
Color codingSwing badges use directional colors only — green for positive swing, near-black for negative swing. Party colors (blue/red) are deliberately not used on swing indicators to avoid implying a value judgment about the direction of change.
Municipality table sortThe municipality table sorts by DEM swing descending by default — municipalities at the top shifted most toward Democrats; municipalities at the bottom shifted most toward Republicans.
Ballots Cast vs. Votes
Ballots cast is the number of physical ballots submitted in a precinct. Each ballot is counted once, regardless of how many races appear on it.
Votes refers to votes recorded for a specific candidate in a specific race. A single ballot contributes one vote to each race the voter participated in.
Why this distinction mattersSumming candidate votes across all candidates in a race to get a precinct "total" would inflate the count. For example, a race with 4 candidates where 1,000 ballots were cast would produce 4,000 total candidate votes — not 1,000. The Ballots columns in the municipality table read total_ballots directly from the data field, accumulated once per precinct, to correctly represent actual voter participation.
Turnout
Turnout is calculated as total ballots cast divided by the number of registered voters in the filtered geography, expressed as a percentage.
Turnout reflects participation in the election as a whole — not in any specific race. It is calculated once per precinct and summed across precincts to produce county or municipality totals.
Turn_Out field in the source data is stored as a decimal (0.25 = 25%). The page multiplies this value by the registered voter count to recover the actual ballot count where total_ballots is not available. For all post-2020 data, total_ballots is used directly.