Differential Privacy Noise Budget Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Overview: What This Calculator Does

This calculator helps you plan and track a differential privacy (DP) noise budget across a sequence of queries. Given a total privacy budget ε, a number of allowed queries, and a query sensitivity, it estimates the per-query privacy cost and the noise scale required under either the Laplace or Gaussian mechanism. It is aimed at data scientists, privacy engineers, and researchers who need a quick way to reason about how much noise to add per query and how much privacy budget remains as analyses progress.

The tool assumes a simple scenario where the total budget is split evenly across all planned queries. It is not a full privacy accountant and should be used for planning and intuition rather than as the sole basis for production-grade privacy guarantees.

Key Concepts: Privacy Budget, Epsilon, Delta, and Sensitivity

Privacy budget and epsilon (ε)

Differential privacy controls how much the output of an analysis can change when a single individual’s data is modified. The parameter ε (epsilon) quantifies this guarantee. Intuitively, smaller ε means stronger privacy but also more noise and lower accuracy. Larger ε relaxes privacy in exchange for higher accuracy.

A privacy budget is the total ε you are willing to spend for a project or dataset. Each query that is answered with a DP mechanism consumes some of this budget. When the budget is exhausted, you should stop releasing additional results or reset the dataset and plan a new budget.

Delta (δ)

Some mechanisms, especially the Gaussian mechanism, provide (ε, δ)-differential privacy. The parameter δ is a small failure probability: with probability at most δ, the guarantee of pure ε-DP may not hold. In practice, δ is often set to something much smaller than 1 / N, where N is the dataset size (for example, 106 or 108).

Query sensitivity (Δf)

Sensitivity Δf measures how much the result of a query can change when one individual’s data is added, removed, or modified. Formally, it is the maximum difference in the query output over all neighboring datasets that differ in one individual.

Mathematical Formulas Used by the Calculator

Per-query epsilon allocation

The calculator assumes that the total privacy budget εtotal is divided equally across the allowed number of queries Q. The per-query budget is

εq = εtotal Q

where:

Laplace mechanism noise scale

For the Laplace mechanism, the noise added to a query output comes from a Laplace distribution with scale parameter b. For a query with sensitivity Δf and per-query epsilon εq, the scale is

b=Δfεq.

Larger sensitivity or smaller per-query epsilon leads to a larger scale b, meaning more noise is added to the answer.

Gaussian mechanism noise scale (standard deviation)

For the Gaussian mechanism, the calculator uses a standard analytic bound for (εq, δ)-DP. The noise added is Gaussian with standard deviation σ given approximately by

σ=Δf2ln(1.25δ)εq.

Here, δ must be a small positive number, and the formula is most appropriate when δ is very small (e.g., 105 or smaller) and εq is not extremely large.

How to Use the Calculator

  1. Set the Total Privacy Budget (ε)
    Choose the total epsilon you are willing to spend for this dataset or project. Typical values in practice might range from about 0.1 (very strict) to 5 or more (looser). The smaller this value, the more noise will be required.
  2. Specify the Total Allowed Queries
    Enter how many queries or releases you plan to support under this budget. The tool divides the total ε evenly across this number, so doubling the query count halves the per-query epsilon.
  3. Enter the Query Sensitivity (Δf)
    For simple counts, use 1. For sums or averages, compute or bound the maximum effect of one individual on the output based on your clipping or normalization rules.
  4. Choose the Mechanism
    Select Laplace for pure ε-DP, or Gaussian if your system uses (ε, δ)-DP. When you choose Gaussian, you also need to set δ.
  5. Set Delta (δ) for Gaussian (if applicable)
    Use a small value such as 1e-5 or smaller. As a rule of thumb, δ should be less than 1 / N, where N is the dataset size, and often much smaller for sensitive data.
  6. Track Queries Used So Far
    As you issue queries over time, update this field. The calculator will estimate how much of the budget has been consumed and how much remains if you continue to allocate epsilon evenly.

Interpreting the Results

The calculator reports several useful quantities derived from your inputs:

If the remaining budget is close to zero or negative, your planned number of queries is not compatible with the chosen total ε. You can address this by reducing the number of queries, accepting more noise (smaller per-query epsilon), or increasing the total privacy budget after a careful policy review.

Worked Example

Consider an analytics project with the following plan:

The per-query epsilon is

εq=1.0100=0.01.

For the Laplace mechanism, the noise scale is

b=Δfεq=10.01=100.

This means each query result will have Laplace noise with scale 100 added. If your counts are typically on the order of a few thousand, this may be acceptable; if they are much smaller, you may find the noise too large and need to reconsider your budget or number of queries.

Now suppose you have already used 40 queries. Under the equal allocation assumption, you have consumed

40×0.01=0.4

of your privacy budget, leaving 0.6 remaining. The calculator will display this remaining budget, helping you decide whether you can afford additional queries at the same noise level.

Laplace vs Gaussian Mechanisms

The table below summarizes some high-level differences between the Laplace and Gaussian mechanisms as used in this calculator.

Aspect Laplace Mechanism Gaussian Mechanism
Privacy type Pure ε-DP (ε, δ)-DP
Noise distribution Laplace(0, b) with scale b=Δfεq Normal(0, σ2) with σ=Δf2ln(1.25δ)εq
Typical use cases Simple counts and numeric queries where pure DP is desired Mechanisms built on advanced accountants, DP-SGD, or when Gaussian noise is preferred
Parameters required εq, Δf εq, δ, Δf
Tail behavior Heavier tails than Gaussian; occasionally larger deviations Lighter tails; deviations more concentrated near the mean
Compatibility with this tool Direct application of the standard Laplace DP formula Uses a standard analytic bound; not a full Gaussian DP accountant

Assumptions and Limitations

This calculator is intentionally simple and makes several assumptions that you should keep in mind:

Typical Ranges for Epsilon and Delta

There is no universally correct choice of ε and δ, but some broad guidelines can prevent extreme misconfigurations:

Practical Workflow Tips

Summary

This differential privacy noise budget calculator offers a simple way to connect abstract privacy parameters (ε, δ, and sensitivity) to concrete per-query noise scales for Laplace and Gaussian mechanisms. By assuming equal per-query allocation and basic composition, it helps you reason about how many queries your budget can support and how noisy each result will be. However, because it omits advanced composition, detailed accounting, and dataset-specific constraints, its outputs should be treated as planning guidance rather than definitive guarantees.

Enter your privacy parameters to calculate noise scale and remaining budget.

Embed this calculator

Copy and paste the HTML below to add the Differential Privacy Noise Budget Calculator to your website.