sigfig
Python library for rounding numbers (with expected results)
Decision gist · record as of 2026-08-14
Yes, if you need reliable significant-figure or uncertainty-based rounding. The package is stable (Production/Stable status), permissively licensed, has no known vulnerabilities, and carries low install friction. The aging maintenance status (last release 522 days ago) is not a blocker for a mature rounding library, but verify that its behavior matches your specific rounding requirements before adopting it in new projects.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later (supports up to 3.12).
- Low install friction with a single lightweight dependency (sortedcontainers).
- Last release was 522 days ago; the repository is not archived and receives occasional updates, though the aging maintenance status suggests infrequent active development.
License · maintenance · safety
MIT License (permissive) — MIT License permits commercial and private use, modification, and distribution with minimal restrictions, making it suitable for most projects without licensing concerns.
last release 2025-03-10 (522 days) · last repo commit 2025-03-10 · 26 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 824,182 downloads/mo, #4,963 on PyPI
Alternatives
Verify before relying
pip install sigfig
from sigfig import round
round(3.14159, sigfigs=2) # Returns '3.1'
round(0.25, decimals=1) # Returns '0.3'- Whether the package handles edge cases like very large numbers or extreme precision requests gracefully.
- Performance characteristics when rounding large datasets or in tight loops.
What it is and what it does
sigfig is a Python library that fixes the unintuitive behavior of Python's built-in round() function by providing mathematically correct rounding based on significant figures, decimal places, or measurement uncertainty. It accepts numbers in multiple formats (int, float, string) and returns rounded results as strings or formatted output.
The package is designed for scientific, financial, and educational contexts where rounding precision matters. It supports several output formats including Drake notation and uncertainty representation, making it useful for publishing results, displaying measurements with error bounds, or ensuring consistent numerical behavior across calculations where standard Python rounding would give unexpected results.
Use it for
- Round measurement data with associated uncertainty for scientific publications or lab reports.
- Format financial figures to significant digits for regulatory or presentation purposes.
- Ensure consistent rounding behavior in educational software or numerical computing workflows.
- Convert numeric results to publication-ready strings with appropriate precision notation.
- Handle rounding in physics or chemistry calculations where significant figures are critical.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need reliable significant-figure or uncertainty-based rounding.
The package is stable (Production/Stable status), permissively licensed, has no known vulnerabilities, and carries low install friction. The aging maintenance status (last release 522 days ago) is not a blocker for a mature rounding library, but verify that its behavior matches your specific rounding requirements before adopting it in new projects.
Install
sigfig on PyPI
Before you install
Low install friction with a single lightweight dependency (sortedcontainers). Last release was 522 days ago; the repository is not archived and receives occasional updates, though the aging maintenance status suggests infrequent active development.
Requires Python 3.8 or later (supports up to 3.12).
License in practice
MIT License permits commercial and private use, modification, and distribution with minimal restrictions, making it suitable for most projects without licensing concerns.
Quickstart
pip install sigfig
from sigfig import round
round(3.14159, sigfigs=2) # Returns '3.1'
round(0.25, decimals=1) # Returns '0.3'
Verify before relying
- Whether the package handles edge cases like very large numbers or extreme precision requests gracefully.
- Performance characteristics when rounding large datasets or in tight loops.
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release <4.0,>=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesortedcontainers |
| Maintenance | Aging 522 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 824,182 / month, #4,963 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Financial and Insurance IndustryIntended Audience :: Healthcare IndustryIntended Audience :: ManufacturingIntended Audience :: Other AudienceIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: EducationTopic :: Education :: Computer Aided Instruction (CAI)Topic :: Office/Business :: FinancialTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: MathematicsTopic :: Scientific/Engineering :: PhysicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities |
Evidence: sigfig-1.3.19-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “round by significant figures”
- sigfigRounds numbers by significant figures, decimal places, or…
- roundersProvides drop-in replacements for Python's built-in `round` function…
- roundrobinProvides four round-robin selection algorithms: basic (cyclic),…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also rounders · uncertainties · py-money · prefixed · ff3 · text2digits · luhn · word2number · matplotlib