One of the exercises in a CHOICE course on how to use VStar, a neat variable star analysis tool provided by the AAVSO, was to use the Leavitt's Law plugin to calculate the distance to Delta Cephei. The following was my response, and it led to an interesting study of how we use Cepheid variables to compute distances to star clusters and galaxies. We might expect this to be cut-and-dried in our era of space-based astronomy, but it turns out to be "not so".
I downloaded data on Delta Cep from the AAVSO data download portal, not from the VStar menu that loads data from the AID, mainly because I wanted to store the raw data file locally. That means there was no associated period information from the VSX. With my new skills at determining periods with DCDFT, it was easy to narrow down on the period, first between 2 and 6 with resolution 0.01, which reported a top hit of 5.37 days, and then with a narrower search from 5 to 6 with resolution 0.001 days, which reported a period of 5.366 days. Using that with Leavitt's Law yielded a distance of 273.16 parsecs.
To find the distance of Delta Cephei, my Patrick Moore's Data Book of Astronomy was my first choice, but that didn't list a distance, only magnitudes and period. My next choice was Cartes du Ciel, the star mapping and planetarium software that is my favorite. It didn't list the distance either, but provided a link to Simbad. The Simbad page loaded lots of information on the star, but not the distance, until checking the distance box in the Measurements area yielded the following: 0.244 kpc, which is 244 parsecs. This compares fairly well with my calculation using Leavitt's Law, to within about a 12% error. That seems somewhat excessive, especially since Del Cep is the prototype star for this class of variable.
The problem seems to be calibrating Leavitt's Law to absolute distances, not the relationship itself. That is assuming you are using the right type of Cepheid, as there is a difference between two "overtone modes". This website explains how the Hubble Space Telescope used highly precise parallax measurements to determine distances to 10 nearby Cepheids to better calibrate Leavitt's Law. This sounds paltry, but Cepheids are relatively rare and there just aren't many that are close enough to measure by parallax. Hubble measurements claim an accuracy of better than 10%, though. Hubble also measured 10 Cepheid variables in the Large Magellanic Cloud and found the slope of the linear relationship between logarithmic period and luminosity to be very close, assuming that all of those variables are at about the same distance from Earth. The calculated distance to the LMC is about 49.4 kpc, which puts it outside the diameter of the disk of the Milky Way Galaxy, which is about 100,000 light years, or 30,674 parsecs, calculated by dividing 100000 ly by 3.26 parsec per ly.
Since Leavitt's Law calibrates to absolute distances via an assumed distance to the LMC, this can lead to a rather knotty problem of chicken-and-egg origins. Current estimates of distance to the LMC from various sources, described in this excellent lecture notes webpage, put the distance from about 44 to 51 kpc, a variation of about 15% from the average of the two estimates. So now we see where the uncertainty comes from. We just can't do any better for now.