Welcome to LabFit

pip install labfit Python ≥ 3.10
LabFit | least-squares curve fitting for Python

LabFit is a small, student-friendly Python library for least-squares curve fitting, error propagation, and plotting.

It ships with built-in textbook models, convenience wrappers for quick analysis, and a plotting layer that can show residuals and multi-series comparisons.

Core goals:

  • Reproducible workflows from CSV to fitted curve in minutes.

  • Reduced χ² (chi-square) analysis returned for every fit so you can immediately assess goodness-of-fit.

  • Multiple series support - plot and fit many lines on one figure with a shared or individual axis.

  • Treat correlated and asymmetric errors correctly without rewriting propagation code each time.

  • Complete reference docs for fitting helpers, built-in model functions, plotting, and utilities.