Skip to content

Instantly share code, notes, and snippets.

@komuw
Last active February 6, 2025 09:00
Show Gist options
  • Save komuw/b7fc41d1cf018bc14f945a010a2045f0 to your computer and use it in GitHub Desktop.
Save komuw/b7fc41d1cf018bc14f945a010a2045f0 to your computer and use it in GitHub Desktop.
cost/spending of public primary, jss and secondary education in kenya
# we are going to try estimate the amount of money the govt(ahem, taxpayer) spends per public school student per year/term.
# We are only interested in the figures for students in PUBLIC primary, jss AND secondary schools.
# All the figures here come from the 2024/25 supplementary estimates I.
# see: https://mwangocapital.com/wp-content/uploads/2024/07/fy-24-25-supplementary-1-.pdf
# aka, the one that was sent to parliament after the 2024/25 finance bill was rejected.
# Number of learners.
# We are only interested in primary, jss & secondary school figures.
# See page 221 of the supplementary estimates.
learners_in_public_primary_sch = 6_450_133 # 6million
learners_in_jss = 3_312_865
learners_in_sec_sch = 3_244_325
learners_in_adult_education = 151_000
learners_provided_with_sch_meals = 4_000_000
total_public_learners = learners_in_public_primary_sch + learners_in_jss + learners_in_sec_sch
total_public_learners = 13_007_323 # 13million.
# Spending for basic education
# See page 229 of the supplementary estimates.
free_primary_education = 21_633_795_702 # KES 21 billion
pri_special_needs_education = 681_248_083
ecde = 18_448_319
pri_teachers_training_in_servicing = 389_469_379
adult_education = 55_275_376
expanding_edu_in_asals = 400_000_000
free_sec_edu = 94_599_910_071 # KES 94 billion
sec_teachers_services = 231_689_981
sec_teachers_training_in_servicing = 252_582_688
sec_special_needs_education = 200_000_000
curriculum_devpt = 1_098_221_559
exams_and_certification = 1_827_000_000
co_curriculum_activities = 1_329_508_180
hq_admin_services = 1_537_919_228
county_admin_services = 3_070_957_202
total_basic_education = (
free_primary_education
+ pri_special_needs_education
+ pri_teachers_training_in_servicing
+ expanding_edu_in_asals
+ free_sec_edu
+ sec_teachers_services
+ sec_teachers_training_in_servicing
+ sec_special_needs_education
+ curriculum_devpt
+ exams_and_certification
+ co_curriculum_activities
+ hq_admin_services
+ county_admin_services
)
assert total_basic_education == 127_252_302_073 # KES 127 billion
# Spending for TSC. We are only interested in TSC spending specifically for primary, jss & secondary(ie, excluding tertiary)
# See page 865 of the supplementary estimates.
teacher_mgmnt_primary = 196_127_073_024 # KES 196 billion
teacher_mgmnt_secondary = 137_015_327_079
teacher_mgmnt_tertiary = 4_533_870_504
governance_and_standards = 1_104_431_830
general_admin = 9_107_215_823
# For `governance_and_standards` & `general_admin`, it is not broken down. ie, it's hard to know what percentage of say `general_admin` is dedicated
# for the general_admin of primary, secondary or tertiary.
# But since `teacher_mgmnt_tertiary` is 1.34% of the total for teacher_mgmnt. We will aportion `governance_and_standards`, `general_admin` in same ratios.
# ie,
governance_and_standards_primary_and_secondary = 1_104_431_830 - ((1.34 / 100) * 1_104_431_830)
governance_and_standards_primary_and_secondary = int(governance_and_standards_primary_and_secondary)
assert governance_and_standards_primary_and_secondary == 1_089_632_443
general_admin_primary_and_secondary = 9_107_215_823 - ((1.34 / 100) * 9_107_215_823)
general_admin_primary_and_secondary = int(general_admin_primary_and_secondary)
assert general_admin_primary_and_secondary == 8_985_179_130
# Thus
total_tsc_for_primary_and_secondary = (
teacher_mgmnt_primary
+ teacher_mgmnt_secondary
+ governance_and_standards_primary_and_secondary
+ general_admin_primary_and_secondary
)
assert total_tsc_for_primary_and_secondary == 343_217_211_676 # KES 343 billion
total_basic_education_budget_spending = total_basic_education + total_tsc_for_primary_and_secondary
assert total_basic_education_budget_spending == 470_469_513_749 # 470 billion
total_spending_per_learner_per_year = total_basic_education_budget_spending / total_public_learners
total_spending_per_learner_per_year = int(total_spending_per_learner_per_year)
assert total_spending_per_learner_per_year == 36_169 # KES 36k per learner per year.
total_spending_per_learner_per_term = total_spending_per_learner_per_year / 3
total_spending_per_learner_per_term = int(total_spending_per_learner_per_term)
assert total_spending_per_learner_per_term == 12_056 # KES 12k per learner per term.
# Do note that the maths is not perfect.
# For instance, the country spends KES 1.8 billion on exams and certification per year.
# I have counted that money as part of the expense for public education.
# But strictly speaking, that money is spent on both public & private
# Since private schools use the same kcpe/kcse provided by govt.
# But this estimates are not meant to be a perfect.
# In any case, if we assume that curriculum_devpt, exams_and_certification, hq_admin_services &
# governance_and_standards_primary_and_secondary are shared between public & private schools
# And we thus exclude them from the calculation.
# The cost drops from KES 36,169 to KES 35,742 per public student per year.
#
@komuw
Copy link
Author

komuw commented Nov 5, 2024

Tax to gdp ratios:

tax_revenue_2012 = 707.4  # billion # https://www.kra.go.ke/images/publications/202021-annual-revenue-performance-final.pdf
tax_revenue_2017 = 1340  # billion #ie, 1.340 trn # https://www.kra.go.ke/images/publications/Revenue-Performance-Report-2018-19.pdf
tax_revenue_2023 = 2407  # billion #ie, 2.407 trn # https://www.kra.go.ke/news-center/press-release/2122-kra-records-11-1-growth-in-revenue-collection

# https://x.com/komu_wairagu/status/1790721073849196944
govt_contribution_to_gdp_2012 = 25  # percent
# https://x.com/komu_wairagu/status/1790721073849196944
govt_contribution_to_gdp_2017 = 40  # percent
# https://www.youtube.com/watch?v=G0OoDb6V-SI&t=2994
govt_contribution_to_gdp_2023 = 50  # percent

# We are using nominal GDP figures since the tax revenues are also nominal.
gdp_2012 = 4_767.191  # billion # nominal # https://www.centralbank.go.ke/annual-gdp/
gdp_2017 = 8_483.396  # billion # nominal # https://www.centralbank.go.ke/annual-gdp/
gdp_2023 = 15_108.806  # billion # nominal # https://www.centralbank.go.ke/annual-gdp/

gdp_without_govt_contribution_to_gdp_2012 = gdp_2012 - (
    (govt_contribution_to_gdp_2012 / 100) * gdp_2012
)
gdp_without_govt_contribution_to_gdp_2017 = gdp_2017 - (
    (govt_contribution_to_gdp_2017 / 100) * gdp_2017
)
gdp_without_govt_contribution_to_gdp_2023 = gdp_2023 - (
    (govt_contribution_to_gdp_2023 / 100) * gdp_2023
)

tax_to_gdp_with_govt_contribution_to_gdp_2012 = (float(tax_revenue_2012) / float(gdp_2012)) * 100
tax_to_gdp_with_govt_contribution_to_gdp_2017 = (float(tax_revenue_2017) / float(gdp_2017)) * 100
tax_to_gdp_with_govt_contribution_to_gdp_2023 = (float(tax_revenue_2023) / float(gdp_2023)) * 100


tax_to_gdp_without_govt_contribution_to_gdp_2012 = (
    float(tax_revenue_2012) / float(gdp_without_govt_contribution_to_gdp_2012)
) * 100
tax_to_gdp_without_govt_contribution_to_gdp_2017 = (
    float(tax_revenue_2017) / float(gdp_without_govt_contribution_to_gdp_2017)
) * 100
tax_to_gdp_without_govt_contribution_to_gdp_2023 = (
    float(tax_revenue_2023) / float(gdp_without_govt_contribution_to_gdp_2023)
) * 100

print(
    f"""
tax_to_gdp_with_govt_contribution_to_gdp_2012: {tax_to_gdp_with_govt_contribution_to_gdp_2012:.2f}%
tax_to_gdp_with_govt_contribution_to_gdp_2017: {tax_to_gdp_with_govt_contribution_to_gdp_2017:.2f}%
tax_to_gdp_with_govt_contribution_to_gdp_2023: {tax_to_gdp_with_govt_contribution_to_gdp_2023:.2f}%

tax_to_gdp_without_govt_contribution_to_gdp_2012: {tax_to_gdp_without_govt_contribution_to_gdp_2012:.2f}%
tax_to_gdp_without_govt_contribution_to_gdp_2017: {tax_to_gdp_without_govt_contribution_to_gdp_2017:.2f}%
tax_to_gdp_without_govt_contribution_to_gdp_2023: {tax_to_gdp_without_govt_contribution_to_gdp_2023:.2f}%
      """
)

# Output:
# tax_to_gdp_with_govt_contribution_to_gdp_2012: 14.84%
# tax_to_gdp_with_govt_contribution_to_gdp_2017: 15.80%
# tax_to_gdp_with_govt_contribution_to_gdp_2023: 15.93%

# tax_to_gdp_without_govt_contribution_to_gdp_2012: 19.79%
# tax_to_gdp_without_govt_contribution_to_gdp_2017: 26.33%
# tax_to_gdp_without_govt_contribution_to_gdp_2023: 31.86%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment