Population Pyramid Generator

Turn age and sex counts into an interactive population pyramid with dependency ratios, median age, and a shape reading.

Population data

Examples

Population pyramid

Structure analysis

Shape reading

Broad age structure

Dependency ratios

Age groups that straddle 15 or 65 are split proportionally, assuming people are spread evenly within the group. Open-ended groups like 85+ count as reaching age 100 where an upper bound is needed.

Your counts stay in this browser. The chart and every download are created on your device — nothing is uploaded or stored.

FAQ

What is a population pyramid?

A back-to-back bar chart of a population by age group and sex: age groups run up the side with the youngest at the bottom, males on the left and females on the right. The shape shows whether a population is young and growing, stable, or aging, and sudden dents or bulges often mark events like baby booms, wars, or migration waves.

How do I enter my own data?

Add one table row per age group, or switch to Paste text and drop in spreadsheet rows with three columns: age group (like 0-4, 5-9, or 65+), male count, female count. A header row is fine — it is skipped automatically. Counts can use your local number format.

How are the dependency ratios calculated?

Youth dependency is people aged 0–14 per 100 people aged 15–64, old-age dependency is people 65 or older per 100 aged 15–64, and the total combines the two. Age groups that straddle 15 or 65 are split proportionally, assuming people are spread evenly across the years in the group.

What does the shape reading mean?

It compares your data with the three classic pyramid types: expansive (children 0–14 make up 30% or more — a young, fast-growing population), constrictive (children under 15%, or people 65+ at 20% or more — an aging population), and stationary in between. It is a teaching signal from those thresholds, not a forecast.

Understanding Population Pyramids

A population pyramid is a specialized back-to-back bar chart that illustrates the distribution of a population across various age groups and biological sexes. The vertical axis represents age cohorts, typically arranged in ascending order from the youngest at the bottom to the oldest at the top. The horizontal axis displays the population size or percentage, with male data plotted on the left and female data plotted on the right.

By structuring demographic data this way, the chart provides an immediate visual signature of a population's underlying dynamics. A pyramid with a wide base indicates a high concentration of young people, whereas a top-heavy structure points to an aging population. Beyond general trends, sudden indentations or prominent bulges along the bars serve as historical records of specific demographic events, such as baby booms, wars, epidemics, or significant migration waves.

The Three Classic Demographic Shapes

Demographers categorize population structures into three primary profiles based on their shape. The Population Pyramid Generator automatically analyzes the age distribution of your entered data to determine which profile it matches, using specific mathematical thresholds:

  • Expansive — wide base, narrow top: This shape represents a young, rapidly growing population. It is characterized by high birth rates and a short life expectancy. The tool triggers this reading when children aged 0–14 make up 30% or more of the total population.
  • Constrictive — narrow base, wider middle: This profile indicates an aging population with declining birth rates and a high proportion of older individuals. The tool identifies a population as constrictive if children aged 0–14 make up less than 15% of the total population, or if older people aged 65 or older make up 20% or more of the total.
  • Stationary — even base and middle: This shape represents a stable population with relatively constant birth and death rates across cohorts. The tool applies this classification when the population percentages fall between the expansive and constrictive thresholds.

These shape readings serve as educational signals derived from these specific thresholds; they do not function as active population forecasts.

Demographic Indicators Explained

To provide a complete picture of a population's structure, the tool calculates several key demographic metrics alongside the visual chart:

Dependency Ratios

Dependency ratios measure the financial pressure on the productive, working-age segment of a population (defined as individuals aged 15–64) by comparing it to the dependent age groups (children aged 0–14 and older people aged 65+).

  • Youth (0–14 ÷ 15–64): Calculated as the population aged 0–14 divided by the population aged 15–64, multiplied by 100. It represents the number of young dependents per 100 working-age people.
  • Old age (65+ ÷ 15–64): Calculated as the population aged 65 or older divided by the population aged 15–64, multiplied by 100. It represents the number of elderly dependents per 100 working-age people.
  • Total: The combined dependency ratio, representing the sum of youth and old-age dependents per 100 working-age individuals.

Aging Index

The aging index measures the balance between the oldest and youngest segments of the population. It is calculated as the number of people aged 65 or older per 100 children aged 0–14. If there are no children aged 0–14 in the dataset, the tool displays "No children 0–14 in the data".

Median Age and Sex Ratio

  • Median Age (estimated): The age that divides the population into two numerically equal groups, where half the people are younger and half are older.
  • Sex Ratio: The proportion of males to females in the population, expressed as the number of males per 100 females.

Handling Complex Demographic Data

When working with real-world census data, age cohorts do not always align perfectly with standard demographic boundaries. The generator applies specific rules to handle these complexities:

Proportional Splitting

Because dependency ratios and shape readings rely on strict age boundaries at 15 and 65 years, any entered age group that straddles these boundaries must be split. The tool splits these straddling cohorts proportionally, assuming an even distribution of individuals across each single year of age within that specific group.

Open-Ended Age Groups

Census datasets frequently end with an open-ended cohort, such as "85+" or "90+". When a calculation requires a defined upper limit (such as estimating the median age or splitting cohorts), the tool assumes an upper bound of 100 years, meaning the group is treated as spanning up to age 100.

Data Validation and Warnings

To ensure the integrity of the visualization, the tool monitors the input data and displays warnings under "Data notes" if it detects structural anomalies:

  • Gaps: "Row ‹position›: no age group covers the years between ‹previous› and ‹label›."
  • Overlaps: "Row ‹position›: ‹label› overlaps the years in ‹previous›."
  • Out of Order: "Row ‹position›: ‹label› sits out of ascending age order — check the row order."
  • Wide Cohorts: "Row ‹position›: ‹label› spans ‹span› years, much wider than the other groups, so its bar compares a different scale of cohort."

Visualizing Local Census Data

The generator supports two input methods to accommodate different workflows:

  1. Table: An interactive grid where you can manually enter values, use "Add age group" to append rows, or use "Remove row ‹position›" to delete specific entries.
  2. Paste text: A direct text area designed for copying and pasting rows from spreadsheets or text files.

Step-by-Step Formatting Guide

To paste data directly from a spreadsheet, organize your source data into three consecutive columns:

  • Column 1 (Age group): The age range, accepting formats like "0-4", "5-9", or "65+".
  • Column 2 (Male count): The population count for males.
  • Column 3 (Female count): The population count for females.

Separate these columns with tabs, commas, or spaces, using one line per age group. If your copied data includes a header row, the tool will automatically detect and skip it. Counts can be entered using your local number format.

Once entered, you can toggle the "Values" control between "Counts" and "Percent" to change how the chart bars and tooltips are displayed. The interactive chart allows you to hover over bars to view specific tooltips, such as "Male: ‹count› (‹share›)" or "Female: ‹count› (‹share›)". You can download the finished chart using "Download SVG" or "Download PNG", and copy the text analysis using "Copy summary".

Local Processing and Privacy

All data processing, parsing, and demographic calculations occur entirely on your local device within your web browser. No population counts, generated charts, or downloaded files are ever uploaded to a server or stored externally.


Frequently Asked Questions

What is a population pyramid?

A back-to-back bar chart of a population by age group and sex: age groups run up the side with the youngest at the bottom, males on the left and females on the right. The shape shows whether a population is young and growing, stable, or aging, and sudden dents or bulges often mark events like baby booms, wars, or migration waves.

How do I enter my own data?

Add one table row per age group, or switch to Paste text and drop in spreadsheet rows with three columns: age group (like 0-4, 5-9, or 65+), male count, female count. A header row is fine — it is skipped automatically. Counts can use your local number format.

How are the dependency ratios calculated?

Youth dependency is people aged 0–14 per 100 people aged 15–64, old-age dependency is people 65 or older per 100 aged 15–64, and the total combines the two. Age groups that straddle 15 or 65 are split proportionally, assuming people are spread evenly across the years in the group.

What does the shape reading mean?

It compares your data with the three classic pyramid types: expansive (children 0–14 make up 30% or more — a young, fast-growing population), constrictive (children under 15%, or people 65+ at 20% or more — an aging population), and stationary in between. It is a teaching signal from those thresholds, not a forecast.