GDP Growth Rate Per Capita Calculator
This calculator helps you determine the annual growth rate of GDP per capita for a country or region. GDP per capita is a measure of a country's economic output that accounts for its number of people. It is calculated by dividing the country's gross domestic product by its total population. A rising GDP per capita indicates that the economy is growing at a faster rate than the population, suggesting an improvement in the average standard of living. Conversely, a falling GDP per capita might signal economic stagnation or a population growing faster than the economy.
To calculate the GDP growth rate per capita, you need two key pieces of information for two consecutive years:
- GDP per Capita (Year 1): The gross domestic product per person in the earlier year.
- GDP per Capita (Year 2): The gross domestic product per person in the later year.
The formula used is: ((GDP per Capita Year 2 – GDP per Capita Year 1) / GDP per Capita Year 1) * 100
function calculateGdpGrowthRatePerCapita() {
var gdpPerCapitaYear1 = parseFloat(document.getElementById("gdpPerCapitaYear1").value);
var gdpPerCapitaYear2 = parseFloat(document.getElementById("gdpPerCapitaYear2").value);
var resultDiv = document.getElementById("result");
if (isNaN(gdpPerCapitaYear1) || isNaN(gdpPerCapitaYear2)) {
resultDiv.innerHTML = "Please enter valid numbers for both GDP per capita values.";
return;
}
if (gdpPerCapitaYear1 === 0) {
resultDiv.innerHTML = "GDP per Capita (Year 1) cannot be zero for this calculation.";
return;
}
var growthRate = ((gdpPerCapitaYear2 – gdpPerCapitaYear1) / gdpPerCapitaYear1) * 100;
resultDiv.innerHTML = "GDP Growth Rate Per Capita:
" + growthRate.toFixed(2) + "%";
}
.calculator-container {
font-family: sans-serif;
max-width: 600px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.calculator-container h2 {
text-align: center;
margin-bottom: 15px;
color: #333;
}
.calculator-container p {
line-height: 1.6;
margin-bottom: 20px;
color: #555;
}
.calculator-container ul {
margin-bottom: 20px;
color: #555;
}
.calculator-container li {
margin-bottom: 8px;
}
.calculator-inputs {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
margin-bottom: 20px;
}
.input-group {
display: flex;
flex-direction: column;
}
.input-group label {
margin-bottom: 5px;
font-weight: bold;
color: #444;
}
.input-group input {
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1rem;
}
.calculator-inputs button {
padding: 12px 20px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 1.1rem;
transition: background-color 0.3s ease;
grid-column: 1 / -1; /* Make button span across all columns */
}
.calculator-inputs button:hover {
background-color: #0056b3;
}
.calculator-result {
margin-top: 20px;
padding: 15px;
background-color: #e9ecef;
border: 1px solid #ced4da;
border-radius: 4px;
text-align: center;
font-size: 1.2rem;
color: #333;
}
.calculator-result strong {
color: #28a745;
}