skillfed

uncertainties

calculations with values with uncertainties, error propagation

uncertainties v3.2.3 2.6M downloads/30d#2,976 on PyPI675
Permissive license Revised BSD License Active released

What it is and what it does

The uncertainties package lets you perform calculations on numbers that have measurement errors or uncertainties attached to them, automatically computing how those errors propagate through your math. Instead of manually tracking error bars at each step, you work with uncertain values directly—operations like addition, multiplication, and trigonometric functions all handle error propagation transparently. The package correctly accounts for correlations, so expressions like x - x evaluate to exactly zero rather than showing spurious uncertainty.

It supports most standard mathematical operations including functions from the math module, comparison operators, and array operations through a NumPy-like interface. You can also extract derivatives of any expression automatically, which the package uses internally for error propagation but exposes for your own use. The package is designed to require minimal changes to existing code—you typically just replace float literals with uncertain values and the rest works as expected.

Use it for:

  • Physics or chemistry experiments: track measurement uncertainties through multi-step calculations and report final results with error bars
  • Engineering design: propagate component tolerances through system models to predict overall system uncertainty
  • Data analysis: compute statistics on datasets where each point has an associated measurement error
  • Educational demonstrations: show students how errors accumulate through calculations without manual error propagation formulas
  • Calibration and metrology: combine multiple uncertain measurements and track how uncertainty changes through transformations

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Performs arithmetic and mathematical operations on values with uncertainties, automatically propagating errors through calculations and tracking correlations between expressions.

Yes. The package is actively maintained, has no dependencies, installs easily, carries no security vulnerabilities, and solves a genuine problem in scientific and engineering workflows. It's production-stable (since 2010) and widely used. Install it if you work with measurements or experimental data where uncertainty quantification matters.

Install

uncertainties on PyPI

pip

pip install uncertainties

uv

uv add uncertainties

poetry

poetry add uncertainties

Installing uncertainties

Before you install

Low friction installation with no runtime dependencies. Active maintenance status with recent commits and a stable release history since 2010.

License in practice

Released under the Revised BSD License (permissive), allowing use in commercial and proprietary projects with minimal restrictions.

Quickstart

pip install uncertainties

from uncertainties import ufloat
x = ufloat(2, 0.25)
square = x**2
print(square)  # 4.0+/-1.0
print(square.nominal_value, square.std_dev)

Verify before relying

  • Whether the package supports symbolic uncertainty propagation or only numerical methods
  • Performance characteristics when working with very large arrays or matrices of uncertain values

Package facts

License Revised BSD License (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 480 days since the last release
Last repo commit
First released
Downloads 2,595,858/month — #2,976 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: uncertainties-3.2.3-py3-none-any.whl

Keywords: error propagation, uncertainties, uncertainty calculations, standard deviation, derivatives, partial derivatives, differentiation

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Other AudienceIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: JythonProgramming Language :: Python :: Implementation :: PyPyTopic :: EducationTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: MathematicsTopic :: Scientific/Engineering :: PhysicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

error propagation calculationsuncertainty quantificationvalues with error barsautomatic error propagationuncertainty arithmeticstandard deviation trackingderivative calculation
scientific-computingerror-analysismeasurement-uncertainty

More Software Development packages