Stan
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
-
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.
-
rstan
rstan
Public
RStan, the R interface to Stan
-
pystan2
pystan2
Public archive
PyStan, the Python interface to Stan
-
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…
-
example-models
example-models
Public
Example models for Stan
-
bayesplot
bayesplot
Public
bayesplot R package for plotting Bayesian models
Repositories
Showing 10 of 53 repositories-
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++ 848 BSD-3-Clause 227 270 (40 issues need help) 57 Updated Dec 3, 2026 -
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,791 BSD-3-Clause 393 137 (10 issues need help) 24 Updated Dec 3, 2026 -
stanc3
Public
The Stan transpiler (from Stan to C++ and beyond).
stan-dev/stanc3's past year of commit activity OCaml 163 BSD-3-Clause 60 85 (14 issues need help) 9 Updated Dec 3, 2026 -
projpred
Public
Projection predictive variable selection
stan-dev/projpred's past year of commit activity R 114 32 19 8 Updated Dec 3, 2026 -
cmdstanpy
Public
CmdStanPy is a lightweight interface to Stan for Python users which provides the necessary objects and functions to compile a Stan program and fit the model to data using CmdStan.
stan-dev/cmdstanpy's past year of commit activity Python 198 BSD-3-Clause 85 23 3 Updated Dec 2, 2026 -
loo
Public
loo R package for approximate leave-one-out cross-validation (LOO-CV) and Pareto smoothed importance sampling (PSIS)
stan-dev/loo's past year of commit activity R 160 40 43 (1 issue needs help) 21 Updated Dec 2, 2026 -
rstan
Public
RStan, the R interface to Stan
stan-dev/rstan's past year of commit activity R 1,092 265 346 12 Updated Dec 1, 2026 -
performance-tests-cmdstan
Public
Performance testing tools for use with CmdStan
stan-dev/performance-tests-cmdstan's past year of commit activity Python 9 8 4 1 Updated Dec 1, 2026 -
cmdstan
Public
CmdStan, the command line interface to Stan
stan-dev/cmdstan's past year of commit activity C++ 241 BSD-3-Clause 106 47 (1 issue needs help) 3 Updated Dec 1, 2026 -
posterior
Public
The posterior R package
stan-dev/posterior's past year of commit activity R 174 28 59 (1 issue needs help) 8 Updated Nov 26, 2026