Methodology & Technical Note

How this model calculates what it calculates — the financial mechanics, the impact assumptions, and the things it deliberately does not attempt.

Last revised 2026-10-22. This note is kept in step with the model specification in docs/MODEL_SPEC.md; where the two disagree, the specification is authoritative and this page is out of date.

If you are comparing against older outputs, re-run them

This model was substantially corrected in August 2026. Figures produced before then are not comparable — several headline numbers moved materially. Rate inputs from an older version must also be re-entered rather than copied, because rates are now typed as percentages (40, not 0.40).

Developers: the full change record is in docs/ANALYSIS.md and docs/adr/.

Model logic at a glance

This is the shortest honest route through the model. It is a deterministic scenario calculation, not a forecast: the same assumptions always produce the same result, and the model does not assign probabilities to them.

  1. Set evidence and assumptions. Blue fields are dated country observations or transparent derivations. Amber fields are programme choices that the API may inform but never sets.
  2. Separate the two ledgers. Grant capital pays subsidy; loan capital funds enterprises, household credit, operations, and senior debt. The ledgers never lend to each other.
  3. Run the monthly waterfall. Collections arrive, investor debt and operating costs are paid, and the operating reserve is protected before new lending is allowed.
  4. Build through capacity and loan cohorts. Active enterprises, unserved target need, unit cost, and available grant/loan capital limit monthly toilets. Each disbursement then amortises as its own cohort.
  5. Report results and two verdicts. Reach, cash, debt, and impact come from those monthly records. Integrity asks whether the arithmetic reconciles; viability asks whether the specified fund works.

Before using a result in a decision

  • Check the year and relevance of every blue country value.
  • Replace every material amber programme assumption with a term sheet, budget, portfolio record, delivery plan, or explicit policy decision.
  • Confirm enterprise starting numbers, recruitment pace, productivity, and closure evidence.
  • Confirm household and enterprise rates, terms, write-down hazards, and senior debt terms.
  • Keep DALY valuation and carbon off unless the programme has an approved method and evidence.
  • Run sourced low/base/high sensitivities and report both integrity and viability—not only reach.
  1. Model logic at a glance
  2. What this model does
  3. The two verdicts
  4. Input validation
  5. The monthly waterfall
  6. The dual ledger
  7. Loan portfolio mechanics
  8. Investor debt
  9. Growth and constraints
  10. Wind-up
  11. Impact methodology
  12. Parameter dictionary
  13. Data sources
  14. Assumptions and limitations
  15. Open questions

1. What this model does

It simulates a blended-finance revolving fund that finances market-based sanitation, month by month, over a chosen horizon. Capital flows in three hops:

Investors ──grant──▶ GRANT LEDGER ──subsidy──▶ Households (no repayment) ──loan───▶ LOAN LEDGER ──loan─────▶ Micro-enterprises (repay with interest) ──loan─────▶ Households (repay with interest) LOAN LEDGER ──service──▶ Investors (principal + interest)

It answers three questions, and it is built to answer these rather than to be a general-purpose financial model:

  1. Solvency. Does the fund run out of cash, and when?
  2. Repayment. Is senior debt repaid in full, within its term?
  3. Reach and impact. How many toilets, people, DALYs and tonnes of CO2e, at what cost per unit?

Deliberately out of scope: foreign exchange and multi-currency, taxation, sale of the portfolio to a third party, borrower-level heterogeneity, district-level disaggregation, construction quality, and behavioural adoption dynamics. Adding any of these is a decision to be recorded, not a feature to be slipped in.

2. The two verdicts

After every run the model reports two separate results, and the distinction matters more than any single number on the dashboard.

Verdict Question What a failure means
Ledger integrity Is the arithmetic internally consistent? A defect in the model. Cash has appeared or vanished, a total does not match its components, or a value is not a number. Report it; do not work around it.
Fund viability Does the fund actually work? A finding about your scenario. The model is telling you the fund as specified does not stand up. That is a legitimate and useful result, not an error.

A run is viable only if all four of these hold:

V1 min(loan-ledger cash) >= 0 loan ledger never overdrawn V2 past-due principal <= $1,000 no scheduled principal missed V3 capitalised interest < $1,000 never had to roll up unpaid interest V4 OSS >= 1.0 operations cover themselves

V1 reads the loan ledger only. The loan ledger pays investor debt service and fixed operations; grant cash is ring-fenced and can never be used for either. Testing the pooled balance let a large grant hide an overdrawn loan ledger, so since 2026-10-23 the depletion year, months insolvent, minimum cash and ops coverage rows all describe the loan ledger (ADR-0057).

Why this is called out so prominently

Until 2026-08-20 the model printed “Model Integrity Verified” for its own shipped demonstration scenario — a fund that went insolvent in year four and defaulted on 18.7% of its senior loan. The insolvency and the default were written to the browser console, where nobody sees them. The line that would have failed the run was commented out and labelled “optional strictness”.

A green tick against a failing fund is worse than no check at all, because it stops anyone looking. The two verdicts are now computed separately, shown separately, and never merged into a single “model OK” indicator.

How to read the sustainability scorecard

These measures answer different questions and must not be substituted for one another:

MeasureDefinitionWhat it says
OSSLoan interest / fixed + variable operationsWhether loan income covers operating costs over the run. Excludes carbon revenue, which goes to the ring-fenced grant ledger and cannot pay operations, and excludes write-downs and investor interest. Shown as n/a when there is no operating cost.
FSSLoan interest + carbon revenue / operations + write-downs + investor interestWhether revenue covers the full financial cost set modelled here.
Capital PreservationEnding net assets / initial grant and loan capitalHow much whole-fund balance-sheet value remains.
Grant Equity MultipleEnding net assets / initial grant capitalEnding value relative to the grant contribution; shown as a multiple, not a percentage.
Senior Principal RepaidPrincipal repaid / initial senior loanThe investor-repayment measure. Ring-fenced grant cash is never counted as recovery.

2A. Input validation

The model checks every numeric input before running the first month. Blank, malformed, infinite, or structurally impossible values produce no result. The message lists all fields detected at once, and any result from an earlier run is cleared so it cannot be exported or mistaken for the revised scenario.

The checks protect the equations rather than making policy choices: denominators and loan terms must be positive; money, costs, counts, and impact quantities cannot be negative; shares and annual write-down or closure hazards stay between 0% and 100%; compound rates must be above -100%; discrete month/count fields must be whole; saved time cannot exceed 24 hours per day; and investor grace cannot extend beyond the repayment term when loan capital exists. The model does not invent upper limits for prices, interest rates, capital, or programme scale.

Exports are calculation snapshots. A successful run retains the assumptions that produced it. CSV and clipboard reports use those retained assumptions and the same senior-liability and leverage KPIs shown by the model; they do not reread a form that may have been edited after the run or reconstruct headline figures with separate formulas.

Advice is model-tested, not AI-generated. The advice control first recalculates the current form. Every option it displays has then been tested by rerunning the model with that one change, and the panel reports the resulting repayment percentage and change in toilets. Suggestions never alter inputs. If no single tested change improves the shortfall enough, the model says so instead of guessing.

3. The monthly waterfall

Within each month, operations run in this exact order. The ordering is the point: debt and operations are funded before the fund is permitted to lend, which is what makes the solvency gate meaningful.

# Step Effect
1 Retire toilets past their service life Stops carbon crediting for that vintage
2 Micro-enterprise closures Reduces production capacity
3 Inflation and unit cost for the month —
4 Collect household repayments and interest Loan ledger +
5 Collect micro-enterprise repayments and interest Loan ledger +
6 Service investor debt — interest first, then principal Loan ledger −
7 Pay fixed operating costs Loan ledger −
8 Solvency gate — may the fund lend at all? —
9 Micro-enterprise expansion lending Loan ledger −
10 Toilet production — grants first, then loans Grant ledger −, loan ledger −
11 Carbon revenue Grant ledger +
12 Record impact and push the audit trail —

Reading the monthly implementation table

New MEs is the number of sanitation micro-enterprises launched in that month. New ME Loans is the corresponding amount lent. The loan amount covers both the setup cost and the working-capital requirement described below, so it should not be divided by setup cost alone to infer a count. The month-zero startup cohort is shown separately from later expansion. The table scrolls inside its own panel in both directions; its headings remain visible while scrolling through longer runs.

The solvency gate

New lending is permitted only when the fund holds more than its operating reserve:

requiredReserve = 3 months of FULL fixed operating cost (never the hibernation-cut figure) + the next 3 months of scheduled investor principal solvent = loanCash >= requiredReserve AND grantCash >= 0 lendable = solvent ? max(0, loanCash - requiredReserve) : 0

One consequence worth knowing before you read too much into a healthy-looking cash line: the fund lends down to exactly this floor, so minimum cash across a run converges on roughly three months of operating cost plus near-term debt service, almost regardless of how well the fund is doing. Thin headroom is a property of the lending rule, not necessarily a sign of distress.

The debt-service lookahead now exists

Until 2026-08-21 the reserve was 3 × opsCost only — using the ops figure after it had already been cut to 30% during hibernation, so the buffer shrank by 70% exactly when the fund was most fragile, and it ignored investor principal due the next quarter entirely, despite the tool's own documentation claiming that lookahead existed. Both are fixed. On the shipped default scenario, reach fell from 133,469 to 121,358 toilets (−9%) as a direct, predicted consequence: the fund now holds back cash it already knows it owes, instead of lending it away. Minimum cash improved. See docs/adr/0027-debt-service-lookahead-reserve.md.

4. The dual ledger

Two cash pools that never transfer into one another. This is the structure that stops concessional subsidy and repayable capital silently cross-subsidising each other.

Grant ledger Loan ledger
Funded by Initial grant capital, carbon revenue Initial loan capital, all repayments and interest received
Pays for Household subsidies and their variable fees Household loans, micro-enterprise loans, fixed and variable operating costs, investor principal and interest

The headline cash figure is the sum of the two, which means a healthy grant ledger can mask an overdrawn loan ledger in the top-line chart. The CSV export separates them.

In the Annual Cash Flow Breakdown, inflows plot above zero and outflows below zero. Grant bars are each year's actual grant spending, not the change from the prior year's spending. The net cash-flow line is the annual sum of the monthly ledger movements.

For a horizon that is not a whole number of years, the final chart period is labelled with its month count, for example Year 2 (6 months). Its flows cover only those remaining months; its cumulative reach is the position at the actual end of the scenario.

Write-offs are not cash. A loan written down reduces the portfolio balance and is reported as a write-off, but no money leaves the building. This is checked on every run: net cash flow is rebuilt from its components and must reconcile.

5. Loan portfolio mechanics

Cohorts, not a blended balance

Every disbursement creates its own cohort with its own balance, payment and remaining term. Cohorts are never merged. This is what makes term structure and run-off behave correctly — a loan made in month 30 matures in month 30 plus its term, not on some averaged schedule.

Payments

payment = rate == 0 ? principal / termMonths : (principal × rate) / (1 - (1 + rate)^(-termMonths))

The zero-rate branch is not decoration. Without it, a 0% concessional loan produces 0/0, and the resulting NaN propagates silently through the entire ledger — passing every consistency check on the way, because NaN comparisons are always false.

Rate conversion

Annual rates convert to monthly geometrically, never by dividing by twelve:

monthlyRate = (1 + annualRate)^(1/12) - 1

The write-down rate is not the share of loans that fail

The field labelled “Annual Write-down Rate” is converted to a monthly hazard and applied to the outstanding balance every month:

monthlyHazard = 1 - (1 - annualRate)^(1/12) writeOff[m] = balance × monthlyHazard

This is a continuous fractional write-down, not a discrete “x% of borrowers default”. Because an amortising balance declines over its term, realised loss as a share of money lent is lower than the headline rate, and the gap depends on the loan term. On a short term the difference is large.

Interest is charged on the post-write-down balance, so a deteriorating loan also earns less. The payment schedule is not re-amortised, so the loss lands on the final payment rather than as a missed one.

6. Investor debt

A single senior loan, drawn in full at the start, with flat principal amortisation over the repayment term after any grace period, plus interest on the outstanding balance.

Grace defers principal, not interest

Interest accrues from month one regardless of grace. A grace period delays principal repayment so that capital can be deployed; it does not make the money free. The model previously gated both on the grace condition, which silently forgave the interest outright.

The fund never pays money it does not have

available = max(0, loanCash) pay old interest = min(capitalised interest outstanding, available) pay current int = min(current interest, cash remaining) pay principal = min(principal due, cash remaining)

Older capitalised interest ranks first, current interest second, and original principal third. This order is used both during normal operation and for the final settlement at wind-up.

Arrears capitalise

Interest the fund cannot pay is added to the outstanding balance in the month it is missed. Later cash pays that old interest before new obligations. The model reports three separate facts: total interest ever capitalised, how much was later repaid, and how much remains outstanding. Unpaid principal is also carried forward.

ending senior liability = original senior principal - original principal repaid + interest capitalised - capitalised interest repaid

The closing liability is the balance the simulation actually tracked. It previously reconstructed the figure as original loan minus principal repaid, which by construction cannot know about arrears — in a stressed scenario that overstated net assets by more than the original loan.

A longer repayment term can repay less, not more. Principal amortises flat, so stretching the term lowers each payment — but if the schedule now runs past the fund's productive life, the later payments simply never happen and become permanent arrears. The tool's advice engine no longer suggests extending the term, because testing it against the model shows it makes things worse.

7. Growth and constraints

Production capacity

capacity[m] = activeMicroEnterprises[m] × toiletsPerMePerMonth

No learning curve, no seasonality, no supply-chain lag.

Enterprise closure is separate from loan write-down

These are two different events and they have two different parameters:

They come apart in both directions: a business can wind down in good order having repaid in full, and a business can fall behind on payments while continuing to build. Deriving one from the other would bake in an equivalence that does not hold. Previously only write-down was modelled, so a 50% write-down rate left production capacity completely untouched.

Unserved target need — not a demand forecast

backlog[m] = backlog[m-1] × (1 + populationGrowth)^(1/12) - production[m]

The unserved target grows. Population growth was previously collected from the user, auto-filled from World Bank data, and used nowhere — so the model showed a fund closing a gap that is in reality widening.

This is population need, not measured borrower demand. The API observes rural people without basic sanitation. It does not observe willingness to borrow, affordability, eligibility, product preference, or monthly uptake. The UNICEF Malawi pilot targeted households that were willing and able to borrow; this model does not model those uptake dynamics. Toilet output is therefore conditional delivery potential under sufficient uptake, not a forecast of adoption. Do not invent a national uptake percentage: use programme market research or an explicit scenario bound.

What binds

Each month, the remaining target and enterprise capacity set planned production. Grants are allocated first, up to the grant support percentage and available grant cash; loans fill the remainder as far as loan capital allows.

planned = min(floor(demand), floor(capacity)) capacity foregone = floor(demand) - planned loan-capital loss = planned - actual production

The two losses reconcile target need to actual production. The model also reports how much additional output would have been possible if the intended grant allocation had been fully funded while loan capacity stayed unchanged. That grant figure overlaps the loan-capital loss, so it is explanatory rather than additive.

The dashboard ranks these actual monthly output losses over the horizon. It shows the largest as the primary constraint, lists every other positive cause as secondary, and labels a month Mixed when capacity and capital suppress production together. The same backlog may remain constrained in successive months, so this is a ranking of production opportunities, not a count of unique households.

Grant Support % paces subsidy, it does not increase it

Total grant-funded output is capped by the grant ledger, so the affordability limit binds long before the target percentage does. Sweeping this parameter from 5% to 90% — an eighteen-fold change — moves grant-funded toilets by under 4%. What it does change is how fast the grant fund is spent: at 5% it lasts around two years, at 90% around four months.

Treat it as a deployment-rate control. To subsidise more households, add grant capital.

8. Wind-up

The fund is wound up at the first month that opens with nothing left to do:

portfolio == 0 nothing left to collect production == 0 nothing being built lendable == 0 gate shut, no capital to redeploy

In that month, operating costs and new interest stop. All remaining original senior principal becomes due, and positive loan-ledger cash is paid to the senior investor: old capitalised interest first, then principal. Grant cash remains ring-fenced for subsidy purposes. The ledger freezes after that one terminal transfer. Closing figures are measured at wind-up, not at whatever horizon happened to be requested.

Without this, a fund that collapsed in year four kept paying a collections team for the remaining sixteen years of a twenty-year run, against no income at all. Reported ending cash was therefore a measure of how long the simulation was left running rather than of how the fund performed — the same fund closed at −$36,351 over five years and −$1,029,034 over twenty. Extending the horizon now changes nothing.

9. Impact methodology

Health — DALYs averted

dalys[m] = activeToilets[m] × householdSize × burdenDalysPerPersonPerYear × sanitationHealthEffect / 12

Accrued monthly against toilets in service, so a toilet built in month one contributes more over the run than one built in month one hundred. This area-under-the-curve treatment is deliberate.

On country load, the rate is derived for one matching year from the lower uncertainty bound of WHO sanitation-attributable diarrhoeal DALYs, divided by the World Bank estimate of people without basic sanitation. Malawi uses 2019 data and resolves to 0.0096719 DALY per exposed person-year. The live audit found a valid derivation for 42 of the 44 selector countries; Eritrea lacks the matching World Bank denominator and Tuvalu lacks the WHO numerator. Where evidence is incomplete, the model resets the factor to zero and says “not estimated” rather than carrying another country’s value.

The country rate is a burden proxy, not a 100% intervention effect. The separate Sanitation Health Effect input defaults to 21%, the 2022 meta-analysis point estimate for basic sanitation without sewer connection versus unimproved or limited sanitation (RR 0.79; 95% CI 0.61–1.03, moderate certainty). Applying that explicit factor produces about 2,090 DALYs averted in the five-year Malawi reference, rather than assuming that every unit of attributable burden disappears. Replace the factor with programme evidence when service quality, use, coverage, or health effects have been measured.

Physical health impact is not automatically monetised. Value per DALY remains zero by default, so the derived DALY count does not change the gross social value multiple unless a supported programme valuation is supplied separately.

Time saved

hours[m] = activeToilets[m] × householdSize × hoursPerPersonPerDay × 30 hourValue = (avgAnnualIncome / 2,080) × timeValueFactor

The hourly value is derived from the country's own income, not from a fixed figure. Two reasons:

Check this factor before publishing. The method — derive from local income, discount below the wage — is well founded. The 50% Malawi reference follows the conservative opportunity-cost convention in the World Bank Lilongwe Water and Sanitation Project appraisal. Confirm it against whichever cost–benefit guidance your programme reports against.

It replaces a hardcoded $0.50/hour whose origin nobody could reconstruct. The arithmetic suggests it was Malawi's income per working hour at the full wage rate, frozen into a multi-country tool.

Carbon

tonnes[m] = creditingToilets[m] × tonnesPerToiletPerYear / 12 revenue[m] = tonnes[m] × valuePerTonne × fundShare

Credits accrue annually, against toilets still within their service life. Carbon methodologies issue credits over a finite crediting period, and a toilet past its service life is not abating anything. Service life is an input, defaulting to five years.

Carbon revenue accrues to the grant ledger, on the reasoning that carbon finance is concessional.

The default factor is zero and the result is labelled not estimated. People reached or toilets built can scale an evidenced factor, but cannot determine it: credible accounting needs the baseline and project sanitation or wastewater technologies and their methane-conversion assumptions.

Jobs supported

jobsSupported[y] = floor(activeEnterprisesAtPeriodEnd[y]) × jobsPerEnterprise

The Malawi reference uses an explicit, editable assumption of three jobs per active enterprise: one owner/operator and two full-time-equivalent workers. The chart and end-of-project headline use the same formula. This is a point-in-time estimate of jobs supported, not jobs created or job-years, and it has no invented monetary value in the gross social value multiple.

Carbon was previously understated by roughly 250,000×

Three unit errors stacked on one input labelled “Tonnes/Yr”: it was divided by 1,000 as though it were kilograms; the fund's share was divided by 100 a second time having already been converted; and the credit was granted once at construction rather than each year of operation.

The component was, in effect, switched off — and switched off in a way that produced a plausible small number rather than a zero, so it read as “carbon does not move the needle” rather than as a defect. For container-based sanitation and biogas models, where carbon revenue is often decisive, this removed the central argument. Corrected, carbon-financed scenarios shift from capital-constrained to capacity-constrained.

Gross social value multiple

socialValue = (DALYs × valuePerDALY) + (hoursSaved × hourValue) + (carbonTonnes × valuePerTonne) grossSocialValueMultiple = socialValue / capitalInvested capitalPreservation = netAssets / capitalInvested

The multiple measures social value only. Financial performance is reported beside it, never folded in. Previously the DALY term was computed, displayed prominently on the impact card, and then silently excluded from the ratio — so the screen contradicted itself — while ending cash sat inside a social numerator, letting a fund that hoarded capital and built nothing score well.

This is not a formal SROI

The ratio is an undiscounted, unadjusted gross multiple: monetised DALYs, time saved and carbon summed over the run, divided by initial grant plus loan capital. A formal Social Return on Investment, as defined by Social Value International or the UK Green Book, additionally requires:

None of these adjustments has been invented with a generic percentage, because a cross-country constant without programme evidence would be false precision. Until a programme supplies a defined counterfactual, attribution, displacement, time profile, discount rate and valuation basis, this multiple must not be published or cited as an SROI. The machine-readable field keeps the legacy name sroi only as a compatibility alias; the canonical field is grossSocialValueMultiple.

These figures are not comparable to anything produced before 2026-08-20. Three independent changes moved them: the hours-saved formula was corrected, DALYs were brought in, cash was taken out, and the hourly value was re-derived. The label changed from “SROI Ratio” to “Gross Social Value Multiple” on 2026-10-22; the arithmetic did not.

Resolved 2026-08-21. Service life now stops DALYs and time-saved credit, the same way it already stopped carbon — a retired toilet no longer averts disease or saves time in the model. At the shipped 5-year default duration this changes nothing, because no toilet reaches 5 years of age within a 5-year run. On a longer run, headline DALY and time-saved figures fall accordingly — that is the fix working as intended, not a regression. See Q13.

10. Parameter dictionary

Every rate is entered as a percentage

Type 40 for 40%, not 0.40. Conversion happens once, when the model reads the form, and nothing downstream guesses at units.

The form previously taught both conventions at once, under two heuristics that contradicted each other: one divided anything above 1 by 100, the other multiplied anything below 1 by 100. So 100% was ambiguous, and any rate above 100% was unrepresentable — a user modelling 150% inflation, entirely plausible in the countries this tool targets, silently got 1.5%.

Parameter Unit Meaning and notes
Capital structure
Initial Grant Capital USD Seeds the grant ledger. Caps total subsidy for the whole run.
Initial Loan Capital USD Seeds the loan ledger. Senior debt; must be repaid.
Duration years Simulation horizon. Since wind-up was introduced, extending it no longer changes the outcome of a fund that has finished.
Fund Repayment Term years Flat principal amortisation. Longer is not always better — see §6.
Investor Grace Period months Defers principal only. Interest accrues throughout.
Fund Cost of Capital % Annual interest paid to senior investors. This control did not exist before 2026-08-20, so the value defaulted to zero and the fund paid its investors nothing in every result the tool ever produced. The default is an illustrative 2% concessional term; the dated World Bank commercial lending rate is context only and never overwrites it.
Market context
Rural Population Without Basic Sanitation people Observed people, not households or forecast borrowers. Divided by household size to give the maximum unserved target.
Annual Pop Growth % Grows the backlog monthly. Previously collected and unused.
Avg Household Size people One toilet serves one household.
Avg Toilet Cost USD Base cost, before inflation and the variable mark-up.
Avg Annual Income USD From GNI per capita. Now sets the value of time saved; previously collected and unused.
Annual Cost Escalation in Model Currency % Applies to unit costs and fixed operating costs. Not to household incomes. Dated local-currency CPI is shown beside the control as context only because the model is USD-labelled and has no FX or programme cost-basket forecast.
Delivery network
Administrative Units count With enterprises per unit, sets the hard ceiling on the network.
Micro-enterprises / Unit count Ceiling, not a target. Zero is a valid no-network stress case and produces no startup or expansion enterprises.
Initial ME Network (% of Target) % Opening pilot share, capped by affordable enterprise capital. The 15% default starts 84 of Malawi's 560-enterprise target and produces about $7,600 of month-one enterprise interest, instead of assuming 285 enterprises are operating at time zero. It is an illustrative programme assumption, not country data; replace it with the recruitment plan.
Jobs Supported / Active ME jobs/enterprise Editable programme assumption. Malawi reference is three: one owner/operator plus two FTE workers. Reports jobs supported at each period end, not job-years.
Toilets / ME / Month count Flat productivity. No learning curve.
ME Setup Cost USD Cost to train, equip and register one enterprise.
ME Annual Closure Rate % Businesses ceasing to trade each year. Reduces capacity. Distinct from the write-down rate, which reduces loan value. Default 10% — a convention, not a measurement; replace it if you have cohort survival data.
Lending terms
HH / ME Loan Interest Rate % Annual, converted geometrically. A rate of 0 is valid and handled. Dated commercial lending is shown beside both controls as context; it is not a household or enterprise product price.
HH / ME Loan Term months Drives affordability far more than the rate does at these loan sizes.
HH / ME Annual Write-down Rate % Not the share of loans that fail. A continuous hazard on outstanding balance — see §5.
Grant Support % Target share of production that is grant-funded. In practice a pacing control — see §7.
Costs
Annual Fixed Ops Cost USD/yr Inflated monthly. Falls to 30% during hibernation, and stops entirely at wind-up. No country macro API can infer the programme staffing, office, vehicles, systems, audit, and field-service budget.
Mgmt Fee Ratio % Charged on every disbursement.
M&E Cost % Monitoring and evaluation. Not micro-enterprise.
Cost Contingency % A per-unit mark-up on delivery cost reflecting fragility and delivery risk — not a reserve held back and drawn on. It is a programme assumption and is never generated from a governance index.
Impact
Sanitation DALY Burden / Exposed Person DALY/yr WHO sanitation-attributable diarrhoeal DALY lower bound divided by the World Bank population without basic sanitation for the same year. Resets to not estimated when either source is missing.
Sanitation Health Effect % Share of the country burden proxy reported as averted. Interim 21% meta-analysis point estimate for basic non-sewered sanitation; replace with programme evidence.
Value per DALY USD Included in the gross social value multiple when supplied; defaults to zero so the model makes no unsupported health-value claim.
Toilet Service Life years Carbon crediting, DALYs and time-saved credit all stop after this (resolved 2026-08-20/21 — see Q13). No effect at the shipped 5-year default duration.
Hours Saved / Person / Day hours Was a hardcoded constant appearing in two formulas that disagreed with each other.
Value of Saved Time % of wage Applied to income per working hour. Malawi reference default 50%.
Net CO2e Avoided / Toilet tonnes/yr Tonnes, per toilet, per year of service. Requires a project-specific baseline and technology methodology; it cannot be inferred from the number of users.
Value per Tonne / Fund Carbon Share USD / % Share is the fund's cut after broker and verification costs.

11. Data sources

Country context is fetched from the World Bank Indicators API; sanitation-attributable diarrhoeal DALYs come from the WHO Global Health Observatory API. World Bank context uses the latest non-empty observation and shows its year. The DALY denominator deliberately requests population and basic sanitation for the WHO numerator year. Rural household size comes from the DHS Program API (mean household members, rural, latest survey), and the number of administrative units from the geoBoundaries API (second-level units, with their local name and year).

Blue input fields are the country-data boundary. The target population is derived from rural population and rural basic-sanitation access; population growth and income per person are direct observations; the DALY burden factor is the documented WHO/World Bank derivation above; household size and administrative units come from DHS and geoBoundaries. If a country has no DHS survey, household size is cleared and the run pauses until you enter a cited value. Hovering a blue field shows its source year or years. Editing it removes the blue marker, because the resulting value is now the user's assumption. Financing, operating, delivery, loss, and subsidy settings are never coloured as World Bank observations.

Every other input is amber: a programme assumption or scenario choice you supply. Commercial lending and local CPI are repeated beside the related controls with their dates because they are useful benchmarks, but they never set the household APR, enterprise APR, operating budget, or USD escalation rate. The value beside each amber field must come from the programme’s term sheet, budget, and cost/FX forecast.

Indicator Code Used for
Rural population SP.RUR.TOTL Target population, with the sanitation gap
Basic / safely managed sanitation SH.STA.BASS.RU.ZS, SH.STA.SMSS.RU.ZS Size of the unserved gap
GNI per capita NY.GNP.PCAP.CD Affordability, and the value of time saved
Inflation (local-currency CPI) FP.CPI.TOTL.ZG Context only; does not escalate USD-labelled cashflows without an FX path
Population growth SP.POP.GROW Growth of the unserved backlog
Commercial lending rate FR.INR.LEND Context only; does not set the fund's negotiated cost of capital
Poverty headcount SI.POV.DDAY Context only; does not set subsidy policy or write-down assumptions

Administrative units, programme costs, capacity, financing terms, write-downs and subsidy policy are not inferred from APIs. Where an essential observation is unavailable, the related field is cleared and automatic calculation pauses; a previous country's value is never silently retained.

12. Assumptions and limitations

Read this section before quoting any figure from this tool.

What the model is

Simplifications worth knowing

Margin of interpretation

The impact figures rest on assumptions the model cannot validate. Malawi's time-saved default is sourced to a World Bank appraisal. Physical DALYs use the conservative country derivation described above while DALY value remains zero; carbon remains not estimated until project evidence is supplied. Treat impact outputs as scenario arithmetic, not as evidence.

13. Decisions and open work

All original modelling questions are now decided and recorded as ADRs. Q14 was resolved on 21 October 2026: the headline constraint now comes from actual foregone production, reports simultaneous constraints, and keeps grant and loan affordability visible as separate causes. No modelling question is currently open.

Evidence-bounded one-at-a-time sensitivity is now available as reproducible JSON. It accepts no more than eight parameters; every low/high pair must bracket the base case, pass normal model validation, and carry an explicit provenance source. The tool deliberately has no built-in percentage shock or undocumented Malawi range. Transparent JSON scenario save/load/compare is the next decision-support feature.

The current engine remains explicitly USD-only. The adverse twenty-year Malawi result remains a disclosed stress finding and will not be tuned away without new evidence.

Country evidence does not determine programme policy

World Bank observations describe context. They do not set the fund's term sheet, write-downs, operating budget, delivery capacity, or subsidy policy. Malawi's 50% time-value factor is sourced, but it should still be checked against the guidance used by the programme publishing the analysis.

Resolved 2026-08-21, each as its own decision record: Q13 — service life now stops DALYs and time-saved credit, not just carbon (§9). Q3 — Grant Support % stays a flat share of production; means-testing would need a household-level income distribution the model doesn't have. Q6 — the grant and loan ledgers stay strictly separate; no cross-lending. Q7 — one household, one toilet, once; no repeat or upgrade demand modelled. Q9 — the collections floor stops abruptly at wind-up rather than tapering, because a taper rate would be an invented number. Q2 — the Malawi time-value factor is 50%, sourced in ADR-0034. See docs/adr/ for each decision's reasoning.

How to check any of this yourself

The model self-verifies on every run against twenty-one ledger invariants, and the repository carries a regression suite covering input wiring, those invariants, twenty-one recorded scenarios, and an end-to-end run of the application.

npm test — the suite.
node tools/verify-findings.js — re-runs every measurement behind the audit and reports whether each defect is still present.

Specification: docs/MODEL_SPEC.md · Audit: docs/ANALYSIS.md · Decisions: docs/adr/ · Current state: STATUS.md · On-site changelog