Tools · SPBoucher
Menu

SymPy

by SymPy Development Team · Library

Pure-Python computer algebra system for symbolic algebra, calculus, equation solving, matrices, physics modules, code generation and LaTeX output

BSD-3-Clause licenseFreeOpen sourceLocalSelf-hostable
Visit official site Compare

Link verified Nov 2, 2026

Overview

SymPy is an open-source computer algebra system written entirely in Python and released under the BSD 3-Clause license; its only hard dependency is mpmath for arbitrary-precision arithmetic. It performs symbolic simplification, expansion and factorization, calculus (limits, derivatives, integrals, series), equation solving (algebraic, Diophantine, inequalities, ODEs and PDEs), linear algebra with dense, sparse and symbolic matrices, number theory, combinatorics and statistics, with physics modules for mechanics, vectors, quantum mechanics, optics, control and unit systems. Expressions print to LaTeX, MathML and plain text, and the code-generation module emits C, Fortran, Python and other targets, which lets researchers derive a model symbolically and then compile it for numerical work.

Version 1.14.0 is current in the documentation at the time of writing. SymPy is used for deriving first-order conditions, checking algebra in theoretical papers and generating equations for simulation code; it is far slower than compiled systems such as Mathematica or Maple on heavy symbolic computation and has weaker built-in plotting and notebook interfaces, so it is typically paired with Jupyter and NumPy.

Capabilities

  • Symbolic simplification, expansion and factorization
  • Calculus: limits, derivatives, integrals, series
  • Solvers for algebraic, Diophantine, ODE and PDE problems
  • Symbolic and numeric matrices
  • Physics modules: mechanics, vectors, quantum, control, units
  • Code generation to C, Fortran and Python
  • LaTeX and MathML printing

Typical workflows

  1. Deriving and checking first-order conditions for a theory paper
  2. Generating LaTeX equations from derived expressions
  3. Symbolic derivation compiled to NumPy or C for simulation

Strengths

  • BSD-licensed, pure Python, easy to install
  • Integrates with the scientific Python stack
  • Readable, extensible codebase

Limitations

  • Slower than compiled computer algebra systems
  • Limited plotting and GUI
  • Some algorithms less complete than Mathematica or Maple

Prerequisites

  • Python 3 with mpmath

Who it is for

  • Theorists deriving models
  • Educators teaching algebra and calculus
  • Developers generating numerical code

Alternatives & comparison

Mathematica is the proprietary benchmark for symbolic computation with broader algorithms and notebooks; SciPy is numeric rather than symbolic; Lean proves theorems rather than manipulating expressions. SymPy's niche is free symbolic math inside Python.

  • Julia

    Dynamically typed, JIT-compiled language for numerical and scientific computing that aims to combine high-level syntax with compiled-code speed

    Open sourceOpen source
  • Lean

    Open-source functional programming language and interactive theorem prover with dependent types, the Mathlib mathematics library and VS Code tooling, stewarded by the Lean FRO

    Open sourceFree
  • SciPy

    Core open-source Python library for scientific computing on NumPy arrays: optimization, integration, interpolation, linear algebra, sparse matrices, statistics, signal processing

    Open sourceFree
  • Wolfram Mathematica

    Wolfram Research's proprietary technical computing system built on the Wolfram Language, with notebooks, symbolic and numeric computation, visualization, machine learning and curated data

    ProprietaryPaid
Compare SymPy with its alternatives →

Sources & verification

Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.

  • License
    sympy/sympy LICENSE

    https://github.com/sympy/sympy/blob/master/LICENSE

    Supports: license_spdx, source_model

    checked Nov 1, 2026
  • Official documentation
    SymPy 1.14.0 documentation

    https://docs.sympy.org/latest/index.html

    Supports: capabilities, description

    checked Nov 1, 2026
  • Official site
    SymPy

    https://www.sympy.org/en/index.html

    Supports: name, summary, license_spdx

    checked Nov 1, 2026
Confidence
High
Reviewed
Nov 1, 2026
Links
Verified · Nov 2, 2026

Spotted an error?

Broken link, outdated license, wrong category, or a tool that no longer exists? Tell us; reports are reviewed by the editor.

pandas

pandas development team (NumFOCUS) · DataFrames & array computing

In-depth entry

The standard Python DataFrame library for labeled tabular data, time series and I/O to CSV, Excel, SQL, Parquet and more

BSD-3-ClauseOpen sourceFreeLocalNov 2, 2026

Python

Python Software Foundation · Programming languages & runtimes

In-depth entry

General-purpose, dynamically typed programming language with a large standard library and the dominant ecosystem for data science and machine learning

PSF-2.0Open sourceFreeLocalSelf-hostedBroken

QuantLib

QuantLib project (Luigi Ballabio and contributors) · Financial analysis & investing

In-depth entry

Open-source C++ library for quantitative finance covering instruments, term structures, pricing engines and calendars, with Python and other bindings

BSD-3-ClauseOpen sourceFreeLocalNov 2, 2026

statsmodels

statsmodels developers (NumFOCUS) · Econometrics & causal inference

In-depth entry

Python library for estimating statistical and econometric models with R-style formulas, rich result summaries and tests: OLS, GLM, discrete choice, ARIMA, state space, VAR and more

BSD-3-ClauseFreeOpen sourceLocalNov 2, 2026

Stata

StataCorp LLC · Mathematical & statistical computing

Commercial statistical software from StataCorp widely used in economics and social science, with editions BE/SE/MP, a command language, Mata and comprehensive PDF manuals

ProprietaryPaidAcademicLocalNov 2, 2026

Positron

Posit Software, PBC · Mathematical & statistical computing

Posit's multi-language data-science IDE built on Code OSS, with first-class R and Python consoles, variables and plots panes, under the Elastic License 2.0

Elastic-2.0FreeLocalNov 2, 2026