Box-Counting Dimension:
d_f = lim_{ε→0} log N(ε) / log(1/ε)
Cover the fractal with boxes of size ε. Count N(ε) non-empty boxes. The slope of log N vs log(1/ε) gives the fractal dimension.
Koch: d_f = log(4)/log(3) ≈ 1.2619
Sierpinski: d_f = log(3)/log(2) ≈ 1.5850