# Master Data Audit Sample Size Calculator

> Source: https://netray.co/tools/master-data-audit-sample-size-calculator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Work out how many item, vendor or customer records you must inspect to measure error rate with a defensible margin, and read the interval from your findings.

## Category

quality

## Audience

- Data quality analyst
- Internal auditor
- MDM lead
- Quality engineer

## Tool

**Kind:** calculator

**Inputs:**

#### Records in population

**Key:** population

**Type:** number

**Default:** 40000

**Min:** 1

**Step:** 500

**Unit:** records

#### Confidence level

**Key:** z

**Type:** select

**Default:** 1.96

**Options:**

##### 90%

**Value:** 1.645

##### 95%

**Value:** 1.96

##### 99%

**Value:** 2.576

#### Margin of error

**Key:** margin

**Type:** slider

**Default:** 3

**Min:** 1

**Max:** 10

**Step:** 0.5

**Unit:** %

**Help:** Acceptable plus or minus on the measured error rate.

#### Expected error rate

**Key:** expected

**Type:** number

**Default:** 10

**Min:** 1

**Max:** 50

**Step:** 1

**Unit:** %

**Help:** Use 50 if unknown; it gives the largest, safest sample.

#### Errors found in the audit (after sampling)

**Key:** found

**Type:** number

**Default:** 31

**Min:** 0

**Step:** 1

**Unit:** records

**Help:** Fill in once the audit is complete to see the interval.

**Outputs:**

#### Sample size, infinite population

**Key:** n0

**Expr:** z * z * expected / 100 * (1 - expected / 100) / pow(margin / 100, 2)

**Format:** number

#### Records to audit

**Key:** n

**Expr:** min(population, ceil(n0 / (1 + (n0 - 1) / population)))

**Format:** integer

**Primary:** true

#### Share of population audited

**Key:** pct_pop

**Expr:** n / population * 100

**Format:** percent

#### Observed error rate

**Key:** rate

**Expr:** found / n * 100

**Format:** percent

**Primary:** true

#### Interval half-width (plus or minus)

**Key:** half

**Expr:** z * sqrt((found / n) * (1 - found / n) / n) * sqrt(max(0, 1 - n / population)) * 100

**Format:** percent

#### Estimated erroneous records in population

**Key:** est_errors

**Expr:** rate / 100 * population

**Format:** integer

**Chart:**

#### Records to audit vs margin of error

**Type:** line

**X:** margin

**From:** 1

**To:** 10

**Steps:** 18

**Series:**

- n

**Disclaimer:** Assumes simple random sampling and independent records. Stratify by record type or plant when error rates differ by group.

## Content

**Intro:** Auditing every record is rarely practical, but a handful of eyeballed rows proves nothing. This calculator gives the sample size needed to estimate a master data error rate at a stated confidence and margin, then converts your audit findings into an interval you can report.

**Sections:**

#### How to use it

**Body:** Enter the population, such as active items or vendors. Choose the confidence level, usually 95 percent, and the margin of error you can live with. If you have no prior view of the error rate, enter 50 percent; the formula then returns the most conservative sample. After pulling a random sample and checking it against your rules, type the number of defective records into the findings box to get the observed rate, a plus or minus interval and a projected count of bad records across the whole population.

#### The statistics

**Body:** The base sample is z squared times p times one minus p, divided by the margin squared. Because master data populations are finite, the result is reduced with the finite population correction, n equals n0 divided by one plus n0 minus one over N. The interval after the audit uses the normal approximation, z times the square root of p times one minus p over n, shrunk by the same finite population effect. The chart shows that halving the margin roughly quadruples the sample, which is why tight margins are expensive and why a wider margin is fine for a first baseline.

**Bullets:**

- n0 = z^2 x p x (1 - p) / margin^2
- n = n0 / (1 + (n0 - 1) / N)
- Interval = z x sqrt(p(1 - p) / n) x finite correction

#### Using the result well

**Body:** Draw the sample randomly, for example by assigning a random number in a spreadsheet to each record key and sorting. Judgment samples of the records you already suspect will overstate the error rate. Define in advance what counts as an error, and decide whether you count records with any defect or defects per field, since the two give different rates. If your error rate is very low, below one or two percent, the normal approximation is weak and an exact binomial interval is better. For repeat audits, keep the same definition so trends are comparable.

**Cta:** Rule checks across a whole table are cheaper than sampling when you can query it. Netray can help you turn your audit rules into queries over the full ERP dataset, read-only and on-prem if you prefer.

**Faq:**

#### Why does the sample not grow with population size?

**Answer:** Beyond a few thousand records, the required sample barely changes because precision depends mostly on the sample itself. The finite population correction only reduces the number noticeably for small populations.

#### What if I do not know the expected error rate?

**Answer:** Use 50 percent. It maximizes the sample and guarantees at least the stated precision. Run a small pilot of 100 records first if you want a better estimate and a smaller final sample.

#### Should I sample per plant or per record type?

**Answer:** If error rates plausibly differ, yes. Stratify, then compute each stratum separately. A single pooled sample can hide a poorly maintained plant behind well maintained ones.

#### Can I audit fields rather than records?

**Answer:** Yes, but be consistent. Field-level sampling treats each field as the unit, so the population is records times fields checked. Report whether your rate means defective records or defective fields.

## Search terms

sample size calculator data audit, master data audit sample size, how many records to audit, item master audit sample, finite population sample size, data quality sampling plan, confidence interval error rate records

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
