# Rainwater Harvesting Calculator

> Computes the rainwater a roof can collect per year from its horizontal area, the annual rainfall and a runoff coefficient, the litres captured per millimetre of rain, and, given a daily demand and tank size, the days of supply a full tank covers and the share of demand the yield meets.

- Calculator id: `rainwater-harvesting` · Category: Home Energy & Electrical (`energy`) · Tool name: `calculate_rainwater_harvesting`
- Canonical page: https://tttkmbb.com/energy/rainwater-harvesting · This document: https://tttkmbb.com/energy/rainwater-harvesting.md · JSON definition: https://tttkmbb.com/energy/rainwater-harvesting.json

## Purpose

Computes the rainwater a roof can collect per year from its horizontal area, the annual rainfall and a runoff coefficient, the litres captured per millimetre of rain, and, given a daily demand and tank size, the days of supply a full tank covers and the share of demand the yield meets.

**Use when:** You are sizing a rain barrel or cistern, or want to know how much garden or toilet-flushing water a roof can supply.

**Do not use when:** You need a month-by-month storage simulation with overflow and dry spells, or potable-water treatment sizing; the yield is an annual average and ignores first-flush diversion and evaporation beyond the coefficient.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `roof_area_m2` | number | m² | required | Horizontal (plan) area of the roof draining to the tank, in square metres; slope does not change the catchment. (> 0, max 1000000) |
| `annual_rainfall_mm` | number | mm | required | Average yearly precipitation at the site in millimetres (1 mm = 1 L/m²). (min 0, max 15000) |
| `runoff_coefficient` | number |  | optional, default 0.8 | Fraction of rain that reaches the tank after evaporation, splash, gutter overflow and first flush: 0.8–0.9 metal or tile, 0.7–0.8 asphalt shingle, 0.5–0.6 green roof. (> 0, max 1) |
| `daily_usage_liters` | number | L/day | optional | Optional daily demand the rainwater should cover (e.g. 200 L for garden and toilets). (> 0, max 1000000) |
| `tank_size_liters` | number | L | optional | Optional storage volume, to report how many days of use a full tank covers. (> 0, max 100000000) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `annual_yield_liters` | number | L | roof_area_m2 × annual_rainfall_mm × runoff_coefficient. |
| `annual_yield_m3` | number | m³ | annual_yield_liters / 1000. |
| `annual_yield_gallons` | number | gal | annual_yield_liters / 3.785411784. |
| `yield_per_mm_liters` | number | L/mm | roof_area_m2 × runoff_coefficient: litres collected per millimetre of rainfall. |
| `monthly_average_yield_liters` | number | L | annual_yield_liters / 12. |
| `days_of_supply` | number | days | tank_size_liters / daily_usage_liters; only when both are given. |
| `fraction_of_demand_percent` | number | % | annual_yield_liters / (daily_usage_liters × 365) × 100, capped at 100; only when daily usage is given. |

## Formula

`annual_yield_liters = roof_area_m2 × annual_rainfall_mm × runoff_coefficient; yield_per_mm_liters = roof_area_m2 × runoff_coefficient; days_of_supply = tank_size_liters / daily_usage_liters; fraction_of_demand_percent = min(100, annual_yield_liters / (daily_usage_liters × 365) × 100)`

Standard catchment formula (yield = area × rainfall × runoff coefficient), 1 mm of rain on 1 m² = 1 litre. Actual capture depends on rainfall timing and tank overflow, so a tank sized for 2–4 weeks of demand is a common starting point.

## Data Sources

- Wikipedia – Rainwater harvesting — https://en.wikipedia.org/wiki/Rainwater_harvesting (reference, retrieved 2026-09-24)
- U.S. EPA – Soak Up the Rain: Rain Barrels — https://www.epa.gov/soakuptherain/soak-rain-rain-barrels (government, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/rainwater-harvesting?roof_area_m2=…&annual_rainfall_mm=…`
- `POST https://tttkmbb.com/api/v1/calculate/rainwater-harvesting` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/rainwater-harvesting · OpenAPI operationId `calculate_rainwater_harvesting` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "rainwater-harvesting", "inputs": {…}}`

## Example

- 100 m² roof, 600 mm/year, 0.8, 200 L/day, 5,000 L tank: inputs `{"roof_area_m2":100,"annual_rainfall_mm":600,"runoff_coefficient":0.8,"daily_usage_liters":200,"tank_size_liters":5000}` → `{"annual_yield_liters":48000,"annual_yield_m3":48,"yield_per_mm_liters":80,"days_of_supply":25,"fraction_of_demand_percent":65.75}`
- 150 m² metal roof, 1,200 mm/year, 0.9: inputs `{"roof_area_m2":150,"annual_rainfall_mm":1200,"runoff_coefficient":0.9}` → `{"annual_yield_liters":162000,"annual_yield_m3":162,"yield_per_mm_liters":135,"annual_yield_gallons":42796}`

```
GET https://tttkmbb.com/api/v1/calculate/rainwater-harvesting?roof_area_m2=100&annual_rainfall_mm=600&runoff_coefficient=0.8&daily_usage_liters=200&tank_size_liters=5000
```

## Limitations

You need a month-by-month storage simulation with overflow and dry spells, or potable-water treatment sizing; the yield is an annual average and ignores first-flush diversion and evaporation beyond the coefficient. Standard catchment formula (yield = area × rainfall × runoff coefficient), 1 mm of rain on 1 m² = 1 litre. Actual capture depends on rainfall timing and tank overflow, so a tank sized for 2–4 weeks of demand is a common starting point. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Do I use the sloped roof area or the footprint?**

The horizontal footprint: rain falls vertically, so a sloped roof catches the same amount as its plan area.

**Which runoff coefficient should I use?**

0.8–0.9 for smooth metal or glazed tile, 0.7–0.8 for asphalt shingles or concrete tile, 0.5–0.6 for green roofs; subtract about 0.05 if a first-flush diverter is fitted.

**How big should the tank be?**

Enough for 2–4 weeks of demand is a typical rule; larger tanks help in climates with long dry spells but overflow unused capacity in wet ones.

## Related

- [Volume Converter](https://tttkmbb.com/conversion/volume.md) — Convert litres, m³ and gallons.
- [Area Converter](https://tttkmbb.com/conversion/area.md) — Convert the roof area from ft² to m².
- [Pool Volume Calculator](https://tttkmbb.com/everyday/pool-volume.md) — Water volume of a pool the tank might top up.
