The Two Formulas
Filament is a long cylinder, so its weight comes from volume × density:
volume = π × (d/2)2 × length → weight = volume × density
For the common 1.75 mm diameter and PLA's density of about 1.24 g/cm³, a 1 kg spool holds roughly 278 meters of filament (1000 ÷ 1.24 = 806 cm³; ÷ 0.024 cm³ per cm of filament ≈ 33,600 cm). The same spool of PETG (1.27) is a little shorter, ABS (1.04) noticeably longer - about 333 m - which is exactly why slicers that estimate by length disagree with your scale by 10-20% when you switch material.
Why Spools Are Sold by Weight but Measured by Length
Your printer's extruder pushes length (the slicer commands "extrude 5,000 mm"), but filament is bought and shipped by weight. Converting between them requires knowing both the diameter and the density - and diameter itself comes in two standards, 1.75 mm and 2.85 mm, whose weights differ by the square of the ratio: about 2.65× per unit length. A 1 kg spool of 2.85 mm filament is less than 40% of the length of a 1 kg spool of 1.75 mm. Feed the wrong one and every print estimate collapses.
Estimating a Print Before You Start
The practical workflow: run the slicer's material estimate (grams or meters), then check stock by weighing the spool on a kitchen scale - weight remaining − spool tare = grams available. If you only know the length left on the spool, convert it back through the formulas above. This calculator does the whole circle: enter any two of diameter, length, density, and it returns the rest.
Cost per Print Is a Two-Step Division
Filament cost per gram = spool price ÷ 1000. A $22 kg of PLA is 2.2¢/g, so the 86 g bracket from the slicer costs $1.89 of plastic - before printer time, electricity, and failed first layers. Comparing two filament prices per spool instead of per gram is how a "cheap" 750 g spool ends up more expensive than a 1 kg one.
Multi-Material Caution
Densities to keep straight: PLA 1.24, PETG 1.27, ABS 1.04, TPU ~1.21, nylon 1.09 g/cm³. If you swap materials often, the weight-per-meter of your stock changes enough that "half a spool left" means different lengths in each material - weigh, don't eyeball, and the calculator turns the grams into meters whenever you need the other half of the answer.