Skip to content

About Stan

Stan is a state-of-the-art platform for statistical modeling and high-performance statistical computation. Thousands of users rely on Stan for statistical modeling, data analysis, and prediction in the social, biological, and physical sciences, engineering, and business.

Users specify log density functions in Stan's probabilistic programming language and get:

  • full Bayesian statistical inference with MCMC sampling (NUTS, HMC)

  • approximate Bayesian inference with variational inference (ADVI, Pathfinder)

  • penalized maximum likelihood estimation with optimization (L-BFGS)

Stan's math library provides differentiable probability functions & linear algebra (C++ autodiff). Additional R packages provide easy formula syntax to specify linear and generalized linear hierarchical models, posterior visualization, and leave-one-out cross-validation.

Get Started

Stan interfaces with the most popular data analysis languages (R, Python, shell, MATLAB, Julia, Stata) and runs on all major platforms (Linux, Mac, Windows). To get started using Stan begin with the Installation and Documentation pages.

Helping Out

Stan is an active and open developer community. The help-wanted and good-first-issue labels in our repositories try to highlight good places to get started, and we're happy to help more on our forums or Slack.

We have projects in C++, Python, R, OCaml, and more. If you want to help build future versions of Stan, we want to help you get started.

Citing Stan

We appreciate citations for the Stan software because it lets us find out what people have been doing with Stan and motivate further grant funding. See How to Cite Stan for more details.

Open Code & Reproducible Science

Stan is freedom-respecting, open-source software (new BSD core, some interfaces GPLv3). Stan is associated with NumFOCUS, a 501(c)(3) nonprofit supporting open code and reproducible science, through which you can help support Stan.

Popular repositories Loading

  1. stan stan Public

    Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.

    C++ 2.7k 377

  2. rstan rstan Public

    RStan, the R interface to Stan

    R 1.1k 268

  3. pystan2 pystan2 Public archive

    PyStan, the Python interface to Stan

    Python 926 189

  4. example-models example-models Public

    Example models for Stan

    HTML 782 477

  5. math math Public

    The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic model…

    C++ 780 192

  6. bayesplot bayesplot Public

    bayesplot R package for plotting Bayesian models

    R 436 84

Repositories

Showing 10 of 51 repositories
  • stan-dev.github.io Public

    Stan website built using Quarto, theming in repo quarto-config

    stan-dev/stan-dev.github.io’s past year of commit activity
    HTML 20 CC0-1.0 39 11 1 Updated Apr 30, 2025
  • performance-tests-cmdstan Public

    Performance testing tools for use with CmdStan

    stan-dev/performance-tests-cmdstan’s past year of commit activity
    Python 8 8 4 0 Updated Apr 30, 2025
  • cmdstan Public

    CmdStan, the command line interface to Stan

    stan-dev/cmdstan’s past year of commit activity
    C++ 219 BSD-3-Clause 95 44 (1 issue needs help) 3 Updated Apr 30, 2025
  • rstan Public

    RStan, the R interface to Stan

    stan-dev/rstan’s past year of commit activity
    R 1,058 268 339 7 Updated Apr 30, 2025
  • stanc3 Public

    The Stan transpiler (from Stan to C++ and beyond).

    stan-dev/stanc3’s past year of commit activity
    OCaml 145 BSD-3-Clause 48 83 (12 issues need help) 6 Updated Apr 30, 2025
  • example-models Public

    Example models for Stan

    stan-dev/example-models’s past year of commit activity
    HTML 782 477 46 (2 issues need help) 7 Updated Apr 30, 2025
  • math Public

    The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic modeling, linear algebra, and equation solving.

    stan-dev/math’s past year of commit activity
    C++ 780 BSD-3-Clause 192 292 (38 issues need help) 15 Updated Apr 30, 2025
  • stan Public

    Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.

    stan-dev/stan’s past year of commit activity
    C++ 2,650 BSD-3-Clause 377 133 (10 issues need help) 12 Updated Apr 30, 2025
  • cmdstanr Public

    CmdStanR: the R interface to CmdStan

    stan-dev/cmdstanr’s past year of commit activity
    R 146 65 89 (2 issues need help) 6 Updated Apr 30, 2025
  • posteriordb Public

    Database with posteriors of interest for Bayesian inference

    stan-dev/posteriordb’s past year of commit activity
    Stan 194 BSD-3-Clause 40 52 7 Updated Apr 30, 2025