GalenaCraftpine Inc.

Draw a random sample of your service lines for crews to check.

Load your own file of service lines. This page checks the file, draws a random sample with each pick's chance of selection, and turns what your crews find into an estimate of how many lines are lead. It all runs in this browser. Your file is never uploaded.

  1. 1 FileLoad your service lines
  2. 2 CheckColumns and problems
  3. 3 SampleRule, checks and seed
  4. 4 FieldPicks and results
  5. 5 EstimateHow many are lead
Fig. 1

Your service line file

Step 1

Use a CSV file with one row for each service line. It needs a column with each line's own ID, and a column with its material or category. An install year or date is used when the file has one. Other columns, such as the address, can go into the crews' file.

Files up to 250 MB. The file is read here, in this browser, and is not sent anywhere.

No file at hand?

6,240 made-up service lines. None is a real place or a real pipe.

Fig. 1. The file as read in this browser. Its SHA-256 names this exact version of the file. Keep it with the results.

Fig. 2

Columns and checks

Step 2

The page matches your columns to what it needs. Change a match if it is wrong. The list says what is wrong with the file, if anything, and how to fix it.

Load a file in Step 1. Its columns and checks show here.

Fig. 3

Random sample for field checks

Step 3

Crews cannot dig every line. A random sample tells you, with a stated margin, how many are lead. Every line in the pool has the same chance of being picked, and the same seed always draws the same lines.

Rule

Pool

Off by default, so every line with no recorded material can be picked. Health Canada says the National Plumbing Code allowed lead service lines until 1975, and some provinces and territories kept installing them until 1980. Leaving out later installs is Galena's choice, not a rule.

Load a file in Step 1. The pool and the sample size show here.

Fig. 4

Picks and field results

Step 4

Give the crews the picks file. They check each pick and write what they found. If a pick cannot be reached, mark it Not reached and check the next spare, in order. Never swap in a neighbouring line: that breaks the random draw.

Draw a sample in Step 3. The picks show here.

Fig. 5

Estimate from the field results

Step 5

Record results in Step 4. The estimate shows here.

Schedule 2

The rules this page states, with their sources

Each sentence below states a rule, or a fact from an official text. Each was checked against that text on the date given. The official text is the authority, not this page.

No.Applies toWhat this page saysSourceRead
1OntarioOntario's drinking water systems regulation, O. Reg. 170/03, sets no sample of service lines to check what they are made of.O. Reg. 170/03, Drinking Water Systems, under the Safe Drinking Water Act, 2002
The whole regulation. Consolidation period from April 11, 2022 to the e-Laws currency date. Last amendment: 269/22.
2026-11-03
2OntarioIts lead schedule, Schedule 15.1, takes water samples from plumbing and from the distribution system, at a number of points set by the population served.O. Reg. 170/03, Drinking Water Systems, under the Safe Drinking Water Act, 2002
Sched. 15.1, s. 15.1-4 (1). Consolidation period from April 11, 2022 to the e-Laws currency date. Last amendment: 269/22.
2026-11-03
3OntarioIn that regulation, a service pipe runs from the watermain to the property line.O. Reg. 170/03, Drinking Water Systems, under the Safe Drinking Water Act, 2002
s. 1 (1), definition of service pipe. Consolidation period from April 11, 2022 to the e-Laws currency date. Last amendment: 269/22.
2026-11-03
4CanadaHealth Canada's lead guideline recommends testing water at the tap of at least 20 randomly selected homes in each water supply zone, at least once a year.Guidelines for Canadian Drinking Water Quality: Guideline Technical Document, Lead
Section 3.1.1, PDF page 11. Published March 2019.
2026-11-03
5CanadaThe guideline sets no sample of service lines to check what they are made of.Guidelines for Canadian Drinking Water Quality: Guideline Technical Document, Lead
The whole document. Published March 2019.
2026-11-03
6CanadaFor how to apply its guidelines, Health Canada points to the drinking water authority in each jurisdiction.Guidelines for Canadian Drinking Water Quality: Guideline Technical Document, Lead
Section 3.0, PDF page 9. Published March 2019.
2026-11-03
7Ontario and CanadaHealth Canada says the National Plumbing Code allowed lead service lines until 1975, and some provinces and territories kept installing them until 1980.Guidelines for Canadian Drinking Water Quality: Guideline Technical Document, Lead
Section 7.1.2, PDF page 33. Published March 2019.
2026-11-03
8United StatesUnder 40 CFR 141.84(b)(5), every water system must check its non-lead records by confirming the material of a random sample of lines from a validation pool.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(5) and (b)(5)(ii). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
9United StatesThe rule gives a random number generator or a lottery as examples of how to draw the sample.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(5)(ii). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
10United StatesThe pool is every line categorized non-lead, less three kinds: lines whose records show an install after June 19, 1988, or after an earlier State or local ban on lines that are not lead free; lines already confirmed by looking at the outside of the pipe at two or more points; and lead or galvanized requiring replacement lines that were replaced.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(5)(i). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
11United StatesThe rule uses June 19, 1988, or the compliance date of a State or local law against lines that are not lead free, whichever is earlier.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(5)(i). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
12United StatesThe rule asks for at least as many checks as its Table 1 gives: 20 percent of a pool under 1,500 lines, then 322 for 1,500 to 2,000 lines, rising to 384 for more than 50,000.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(5)(ii) and Table 1 to paragraph (b)(5)(ii). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
13United StatesEach pick is confirmed by looking at the outside of the pipe at two or more points. Where ownership is shared, each part gets at least one look.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(5)(ii). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
14United StatesIf a check needs access to private property and the system cannot get in, the system replaces the site with a new line picked at random from the pool.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(5)(iii). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
15United StatesThe default deadline for this check is December 31 following seven years after the compliance date of November 1, 2027, that is December 31, 2034. The State sets another for a system on a shortened, deferred or extended replacement schedule.40 CFR 141.84, Service line inventory and replacement requirements; 40 CFR 141.80, General requirements
141.84(b)(5)(iv) and 141.80(a)(3). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
16United StatesThe system gives the State the results, and the version of the inventory, with its date, that set the pool.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(5)(v). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
17United StatesA line the inventory called non-lead that turns out to be lead or galvanized requiring replacement must be corrected in the inventory, and the State told.40 CFR 141.84, Service line inventory and replacement requirements
141.84(b)(3). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
18United StatesThe rule's four categories are Lead, Galvanized Requiring Replacement, Non-Lead, and Lead Status Unknown or Unknown. A system may record the material, such as plastic or copper, in place of Non-Lead.40 CFR 141.84, Service line inventory and replacement requirements
141.84(a)(3). Up to date as of 10/30/2026. The section's history ends at 89 FR 86634, Oct. 30, 2024.
2026-11-03
19United StatesA line with any part made of lead is a lead service line.40 CFR 141.2, Definitions
141.2, definition of lead service line. Up to date as of 10/30/2026.
2026-11-03
20United StatesA galvanized line is galvanized requiring replacement if it is or ever was downstream of a lead line, or is now downstream of a line of unknown material. If the system cannot show it was never downstream of a lead line, it counts as one.40 CFR 141.2, Definitions
141.2, definition of galvanized requiring replacement service line. Up to date as of 10/30/2026.
2026-11-03

Galena's design choices, not rules

1 Notes

The draw is a simple random sample. Every line in the pool gets the key SHA-256 of the seed, a colon and its line ID, and the lines with the lowest keys are picked. The spares are the next lines in the same order. A pick's chance of selection is the sample size over the pool size. A spare's listed chance is the sample size plus the spares, over the pool size: its chance of being drawn into the list at all. The draw code is the first 12 hex digits of the SHA-256 of the rule, the seed, the pool size, the sample size, the number of spares and every ID in draw order, one to a line, after the text galena-sample-v1. A results file carries it, so results never join the wrong draw.

The estimate counts checked lines only. A line that was not reached is left out of the count and reported beside it. The interval is the Wilson score interval at 95 %. The count for the pool is the pool size times the share, and the same for each end of the interval, kept between the lead lines found and the pool less the lines found not lead. When every line in the pool is picked, the result is a count, not an estimate.

This page reads files and adds up results. It makes no prediction about any line, and it gives no legal advice.

Your file stays in this browser. Nothing is sent anywhere. Results you enter are kept in this browser's storage under the draw code, so they survive a reload. Clear results removes them. Download the picks file to keep or share them.