Electricity production from oil, gas and coal sources (% of total)
Real data: World Bank, World Development Indicators, indicator EG.ELC.FOSL.ZS, retrieved 19 November 2026. Values are as published; we only reshaped the file.
What it measures
The share of electricity production from oil, gas and coal sources of total electricity production. Sources of electricity refer to the inputs used to generate electricity. Oil refers to crude oil and petroleum products. Gas refers to natural gas but excludes natural gas liquids. Coal refers to all coal and brown coal, both primary (including hard coal and lignite-brown coal) and derived fuels (including patent fuel, coke oven coke, gas coke, coke oven gas, and blast furnace gas). Peat is also included in this category.
The numbers in 2024
In 2024, 147 countries have a value. The highest is Turkmenistan (100); the lowest is Ethiopia (0.00677). The median country value is 55.67. The World Bank's World aggregate for 2023 is 48.67.
Top 10 countries, 2024
% of total
Highest, 2024
| # | Country | Value |
|---|---|---|
| 1 | Turkmenistan | 100 |
| 2 | Libya | 99.98 |
| 3 | Trinidad and Tobago | 99.91 |
| 4 | Brunei Darussalam | 99.9 |
| 5 | Kuwait | 99.8 |
| 6 | Bahrain | 99.68 |
| 7 | Gibraltar | 99.58 |
| 8 | Algeria | 99.25 |
| 9 | Botswana | 99.09 |
| 10 | Hong Kong SAR, China | 98.72 |
Lowest, 2024
| # | Country | Value |
|---|---|---|
| 1 | Ethiopia | 0.00677 |
| 2 | Paraguay | 0.00937 |
| 3 | Iceland | 0.0153 |
| 4 | Switzerland | 0.31 |
| 5 | Sweden | 0.506 |
| 6 | Uruguay | 0.932 |
| 7 | Norway | 1.03 |
| 8 | Congo, Dem. Rep. | 1.13 |
| 9 | Namibia | 1.85 |
| 10 | Luxembourg | 2.37 |
How many countries report, by decade
| Decade | Most countries in one year |
|---|---|
| 1990s | 144 |
| 2000s | 206 |
| 2010s | 207 |
| 2020s | 207 |
World aggregate by year
As published by the World Bank (in the regions file, not the country file).
| Year | World |
|---|---|
| 2023 | 48.67 |
| 2022 | 60.72 |
| 2021 | 61.49 |
| 2020 | 61.43 |
| 2019 | 62.9 |
| 2018 | 64.07 |
| 2017 | 64.68 |
| 2016 | 65.3 |
| 2015 | 66.14 |
| 2014 | 66.65 |
| 2013 | 67.12 |
| 2012 | 67.7 |
First rows
electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv
| countrytext | iso3text | regiontext | income_grouptext | yearnumber | valuenumber |
|---|---|---|---|---|---|
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2000 | 6.46268229911353 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2001 | 6.46268229911353 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2002 | 6.46255029718744 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2003 | 19.3691395598403 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2004 | 37.1350640094301 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2005 | 36.9860208594987 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2006 | 29.1044054614401 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2007 | 30.9694157561243 |
Data dictionary
| Column | Type | Meaning |
|---|---|---|
| country | text | Country or economy, World Bank name |
| iso3 | text | ISO 3166-1 alpha-3 code |
| region | text | World Bank region |
| income_group | text | World Bank income group |
| year | number | Calendar year of the value |
| value | number | Electricity production from oil, gas and coal sources (% of total), exactly as the World Bank API returns it (not rounded) |
Only country-years with a value are in the long file; blank cells in the wide file mean no value was published.
Practice questions
answers computed from the file
Which country has the highest value in 2024?
Turkmenistan, with 100.
Excel (on the long CSV: E = year, F = value)
=FILTER(A2:A100000,(E2:E100000=2024)*(F2:F100000=MAXIFS(F2:F100000,E2:E100000,2024)))SQL (table wb = the CSV)
SELECT country, value FROM wb WHERE year = 2024
AND value = (SELECT MAX(value) FROM wb WHERE year = 2024);pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))
y = df[df.year == 2024]
y[y.value == y.value.max()][["country", "value"]]File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv
How many countries report a value for 2024?
147 of the 217 economies in the file's country list.
Excel (on the long CSV: E = year, F = value)
=COUNTIF(E2:E100000,2024)SQL (table wb = the CSV)
SELECT COUNT(*) FROM wb WHERE year = 2024;pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))
(df.year == 2024).sum()File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv
What is the median across countries in 2024?
55.67 (median of the 147 country values; not a World Bank aggregate).
Excel (on the long CSV: E = year, F = value)
=MEDIAN(FILTER(F2:F100000,E2:E100000=2024))SQL (table wb = the CSV)
-- SQLite has no MEDIAN(); this picks the middle value(s)
SELECT AVG(value) FROM (SELECT value FROM wb WHERE year = 2024 ORDER BY value
LIMIT 2 - (SELECT COUNT(*) FROM wb WHERE year = 2024) % 2
OFFSET (SELECT (COUNT(*) - 1) / 2 FROM wb WHERE year = 2024));pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))
df[df.year == 2024]["value"].median()File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv
Which country rose the most between 2014 and 2024?
Togo: from 42.03 to 80.36, a rise of 38.33 (out of 144 countries with both years).
Excel (on the long CSV: E = year, F = value)
Use the wide file (electricity-production-from-oil-gas-and-coal-sources-percent-of-total-wide.csv): add a column = [2024] - [2014], then sort it largest to smallest.SQL (table wb = the CSV)
SELECT a.country, b.value - a.value AS rise FROM wb a JOIN wb b ON a.iso3 = b.iso3
WHERE a.year = 2014 AND b.year = 2024 ORDER BY rise DESC LIMIT 1;pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))
w = df.pivot(index="country", columns="year", values="value")
(w[2024] - w[2014]).dropna().nlargest(1)File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv
Which year has the most countries reporting?
2021, with 207 countries. (Later years are still filling in as countries report.)
Excel (on the long CSV: E = year, F = value)
Make a pivot table: year in Rows, Count of value in Values, then sort by the count.SQL (table wb = the CSV)
SELECT year, COUNT(*) AS n FROM wb GROUP BY year ORDER BY n DESC, year DESC LIMIT 1;pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))
df.groupby("year").size().sort_values(ascending=False).head(1)File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv