Single-molecule localization microscopy (SMLM) yields an image resolution 1-2 orders of magnitude below that of conventional light microscopy, resolving fine details on intracellular structure and macromolecular organization. The massive pointillistic data sets generated by SMLM require the development of new and highly e cient quantification tools. Density based clustering algorithms, such as DBSCAN, can provide spatial statistics on protein/nucleic acid aggregation or dispersion while explicitly identifying macromolecular clusters. The performance of DBSCAN, however, is typically dependent upon an arbitrary, or at least highly subjective, parametric tuning of the algorithm. Moreover, DBSCAN can be computationally expensive, which makes it arduous to evaluate on large image stacks. This is all the more important in 3-dimensions where there exist limited alternatives for quantifying clustering in SMLM data, and where a 2-dimensional analysis of true 3-dimensional data may give rise to image artefacts. We have developed an open-source software package in Python for both identifying and quantifying spatial clustering in 3-dimensional SMLM datasets. FOCAL3D is an extension of our previously developed, 2-dimensional, grid based clustering algorithm FOCAL. FOCAL3D provides a highly e cient way to spatially cluster SMLM datasets, scaling linearly with the number of localizations, and the algorithmic parameters may be systematically optimized so that the resulting analysis is insensitive to variation over a range of parameter choices. We initially validate the performance and parametric insensitivity of FOCAL3D on simulated datasets, then apply the algorithm to 3-dimensional, astigmatic dSTORM images of the nuclear pore complex in human osteosarcoma cells.