$i$ is the inner radius (input).

$s$ is the box shadow spread or margin (input)

$o$ is the outer radius (output)

Pre-2013 Spec

If $i == 0$, then $o = 0$.

Otherwise, $o = i + s$.

Current spec

If $i >= s$, then $o = i + s$.

Otherwise:

  1. $r = i / s$ [note $0 <= r < 1$]
  2. $o = i + s(1 + (r - 1)^3)$

dbaron's proposal (linear variant)

Let $p$ be, for the corner in question, the larger (of the two adjacent sides) portion of the side that is rounded. [note: $0 <= p <= 1$]

If $i >= s$, then $o = i + s$.

Otherwise:

  1. $r = \frac{i}{s}$ [note $0 <= r < 1$]
  2. $o = i + s\cdot\mathrm{max}(1 + (r - 1)^3, p)$

dbaron's proposal (cubic variant)

Let $p$ be, for the corner in question, the larger (of the two adjacent sides) portion of the side that is rounded. [note: $0 <= p <= 1$]

If $i >= s$, then $o = i + s$.

Otherwise:

  1. $r = max(\frac{i}{s}, p)$ [note $0 <= r < 1$]
  2. $o = i + s(1 + (r - 1)^3)$