# Solitary Pulmonary Nodule Risk Calculator

An educational implementation of the **Mayo Clinic malignancy risk model** for solitary
pulmonary nodules, with every variable and coefficient exposed so the arithmetic can be
inspected rather than trusted blindly.

**This is not a medical device and must not be used for clinical decision-making.**

## Scope and validation

- Derivation: Swensen SJ, Silverstein MD, Ilstrup DM, Schleck CD, Edell ES. *The probability
  of malignancy in solitary pulmonary nodules.* Arch Intern Med. 1997;157(8):849–855.
- Validation: Swensen SJ et al. *Radiology.* 2004;231:606–614.
- Applies to **solitary** pulmonary nodules only — not to multiple nodules.
- Validated for patients aged **40 and over**, with nodule diameters between **4 mm and
  30 mm**.

Outside that scope the output is meaningless. Inside it, the output is still an educational
estimate about a population, not a prediction about a person.

## The model

The model is a logistic regression. Six predictors are combined into a linear term *x*,
which is then mapped to a probability:

```
x = -6.8272
  + 0.0391 × age (years)
  + 0.7917 × current smoker      (1 if currently smoking, else 0)
  + 1.3388 × extrathoracic cancer (1 if diagnosed more than 5 years ago, else 0)
  + 0.1274 × diameter (mm)
  + 1.0407 × spiculation         (1 if the margin is spiculated, else 0)
  + 0.7838 × upper lobe          (1 if the nodule is in an upper lobe, else 0)

P = e^x / (1 + e^x)
```

`e` is Euler's number, approximately 2.71828. The logistic function maps any real value of
*x* onto a probability between 0 and 1, which the calculator displays as a percentage.

Note that **former** smokers map to 0 on the smoking term, the same as never-smokers — the
published model codes only *current* smoking status.

## Inputs

**Patient**

- **Age** — in years, 40 or over.
- **Smoking status** — Never / Former / Current. Only *Current* contributes to the score.
- **Extrathoracic cancer more than 5 years ago** — No / Yes.

**Nodule**

- **Diameter** — in millimetres, 4 to 30.
- **Upper lobe location** — No / Yes.
- **Spiculated margin** — No / Yes.

Unfilled toggles default to No / Never, which is 0 in the formula, so the result updates
from the first input onward as a partial estimate.

## Risk tiers

Tier thresholds follow ACCP guidance — Gould MK et al., *Chest.* 2013;143(5 Suppl):e93S–e120S.

| Probability | Tier |
|---|---|
| Under 5% | Low |
| 5% – 65% | Intermediate |
| Over 65% | High |

## Worked example

A 60-year-old current smoker with no prior extrathoracic cancer and a 15 mm spiculated
nodule in an upper lobe:

```
x = -6.8272
  + 0.0391 × 60   =  2.3460
  + 0.7917 × 1    =  0.7917
  + 1.3388 × 0    =  0
  + 0.1274 × 15   =  1.9110
  + 1.0407 × 1    =  1.0407
  + 0.7838 × 1    =  0.7838
x = 0.0460
P = e^0.0460 / (1 + e^0.0460) ≈ 51.1%  → Intermediate tier
```

## Privacy

Every value entered is held in the memory of the page you are looking at. The regression is
evaluated entirely in JavaScript on your own device. There is no server call, no API
request, and no background upload at any point in the calculation. Inputs are not
transmitted, stored, logged, or retained — closing or reloading the tab discards them
permanently. See the [privacy notice](https://nodule.app/privacy).

## Related

- [Nodule Types](https://nodule.app/tutorial) — what diameter and spiculation mean.
- [References](https://nodule.app/references) — the full citations for the model and tiers.
- [Terms of use](https://nodule.app/terms) — the validated scope, stated as a condition of use.

---

*Educational use only · Not a medical device.* This document mirrors the page at
<https://nodule.app/calculator>.
