I know this is old but I think the current answers are close but slightly inadequate. I think the formula itself (rather than comments/descriptions) needs to account for rounding somehow, so here is an actual formula (in Google Sheets or Microsoft Excel syntax) that does work, and I feel is human-readable:
=(ROUNDDOWN(A1/2) - 5)
Where A1 is the ability score (or cell).
You could also use truncation, e.g. TRUNC(A1/2,0)-5
, casting, e.g. INT(A1/2)-5
, or the floor function, e.g. FLOOR(A1/2)-5
to effectively turn the decimals into integers. I feel like ROUNDDOWN
is a bit more self-explanatory.
Mathematically, the above formula would be expressed using the floor function notation:
$$\left\lfloor\frac{a}{2}\right\rfloor - 5$$
Where \$a\$ is the ability score.