We provide a Python command-line tool that implements the measurement-error correction based on a user-specified value of ρ. The package can also estimate ρ by calculating estimates of hSNP2 (using the GREML method29,33 or, for larger datasets, BOLT-REML34) and R2. The package can calculate standard errors either treating ρ as known or (at some computational cost) by bootstrapping. When possible, we recommend users estimate ρ within the dataset they use to analyse the PGI. If the dataset is too small to reliably estimate ρ or lacks a measure of the phenotype corresponding to the PGI, an estimate of ρ from another dataset can be used under the assumption of perfect genetic correlation of the phenotype across datasets. In the Polygenic Index Repository, we provide pre-specified estimates of ρ for three participating datasets for which we have access to the phenotypic data corresponding to the PGI: HRS, WLS, and the third partition of UKB (see Supplementary Table 4). For many of the cohorts, the standard error on the hSNP2 estimate is large, so we recommend a value of ρ based on existing hSNP2 and R2 estimates from a larger sample.