# rlacalc: Online Calculator for Risk-Limiting Audit Sample Sizes

These forms for comparison and ballot-polling risk-limiting audits will each calculate and return **a single number**, via the rlacalc JSON API, providing the requested sample size.

## Ballot-level comparison risk-limiting audits

Fill in this form and hit enter in a field, or hit the Calculate button, to calculate the sample size for a ballot-level **comparison risk-limiting audit**.

This form lets you specify **rates** of discrepancies of each type, rather than the absolute numbers.

The sample sizes for comparison audits depend only on these parameters.

For more information on the calculations and parameters for comparison audits, see Tools for Comparison Risk-Limiting Election Audits

## Ballot-level polling risk-limiting audits

This form is for **ballot-polling audits**

Note that the sample sizes for ballot-polling audits depend on the actual sample that is drawn, and can vary by an order of magnitude or more. The numbers provided here are the mean values. If the sample turns up more ballots favoring the declared winner than would be predicted from the given margin, it will require less than the mean number of samples, and vice versa. About 25% of the time, it will take only 41% of the number reported here, while about 25% of the time it will require 25% more samples, and 10% of the time it will require more than twice the sample size. In one out of a hundred audits it will take over 4 times as many samples.

For more information on the calculations and parameters for ballot-polling audits, see Tools for Ballot-Polling Risk-Limiting Election Audits

## Background

The calculations are performed by the open source python code in
rlacalc.py,
which is part of
audit_cvrs, which helps auditors manage a ballot-level risk-limiting post-election audit.

For more on election auditing, see