Calibrate Gaussian Noise for (ε, δ)-Differential Privacy

Enter your privacy budget and the L2 sensitivity of your query. This tool solves for the minimum Gaussian noise standard deviation σ you must add, using the exact analytic Gaussian mechanism of Balle & Wang (2018) — tighter than the classic closed-form bound, and valid for any ε (including ε > 1).

Required Gaussian σ (analytic mechanism)
Noise multiplier σ/Δ₂
Classic bound σ = √(2 ln(1.25/δ))·Δ₂/ε
Analytic vs classic savings
Gaussian variance σ²
Signal-to-noise ratio (signal/σ)
Verified δ at this σ
Regime
// numpy sampling call appears here

How the calibration works

The Gaussian mechanism releases f(D) + N(0, σ² I). Whether a given σ satisfies (ε, δ)-DP depends only on the noise multiplier μ = Δ₂/σ. The classic analysis (Dwork & Roth) gives the closed form σ ≥ √(2 ln(1.25/δ)) · Δ₂ / ε, but that bound is only valid for ε < 1 and is loose — it can demand far more noise than necessary.

The analytic Gaussian mechanism replaces the bound with the exact privacy condition. For μ = Δ₂/σ, the tight tradeoff function is δ(ε) = Φ(μ/2 − ε/μ) − eε Φ(−μ/2 − ε/μ), where Φ is the standard-normal CDF. Because δ(ε) is monotone decreasing in σ (increasing in μ), this tool runs a binary search on σ until the achieved δ equals your target to within 1e-12. Φ itself is evaluated with a high-accuracy erf rational approximation, so everything runs in the browser with no server round-trip. The "Verified δ" row plugs the returned σ back into the formula so you can confirm the guarantee holds. Cutting σ means less distortion for the same privacy — the analytic mechanism typically saves 5–20% of noise versus the closed-form bound, and much more as ε grows. Report the resulting σ alongside ε and δ whenever you document a private release; the noise multiplier σ/Δ₂ is the scale-free number to compare across queries.

Analytic vs classic bound

PropertyClassic (Dwork–Roth)Analytic (Balle–Wang)
Valid rangeε < 1 onlyany ε > 0
Tightnessupper bound (loose)exact tradeoff
Noise addedmoreminimal

Related Tools

Laplace Mechanism Noise Calculator DP Privacy Budget Composition k-Anonymity Checker