---
name: "plfit"
section: "1"
platform: "linux"
package: "plfit"
version: "0.9.6+ds-2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/plfit"
---

# plfit(1)

fits power-law distributions to empirical data

## NAME

plfit - fits power-law distributions to empirical data

## SYNOPSIS

**plfit** \[*OPTIONS*\] \[*infile* ...\]

## DESCRIPTION

Reads data points from each given input file and fits a power-law distribution to them, one by one, according to the method of Clauset, Shalizi and Newman. If no input files are given, the standard input will be processed.

This implementation uses the L-BFGS optimization method to find the optimal alpha for a given xmin in the discrete case. If you want to use the legacy brute-force approach originally published in the above paper, use the **-a** switch.

## OPTIONS

- **-h**

  shows this help message

- **-v**

  shows version information

- **-a** RANGE

  use legacy brute-force search for the optimal alpha when a discrete power-law distribution is fitted. RANGE must be in MIN:STEP:MAX format, the default is 1.5:0.01:3.5.

- **-b**

  brief (but easily parseable) output format

- **-c**

  force continuous fitting even when every sample is an integer

- **-D** VALUE

  divide each sample in the input data by VALUE to prevent underflows when fitting discrete power-law distribution

- **-e** EPS

  try to provide a p-value with a precision of EPS when the p-value is calculated using the exact method. The default is 0.01.

- **-f**

  use finite-size correction

- **-m** XMIN

  use XMIN as the minimum value for x instead of searching for the optimal value

- **-M**

  print the first four central moments (i.e. mean, variance, skewness and kurtosis) of the input data to help assessing the shape of the pdf it may have come from.

- **-p** METHOD

  use METHOD to calculate the p-value. Must be one of skip, approximate or exact. Default is skip.

- **-s** SEED

  use SEED to seed the random number generator
