What the calculation does
Spendable equals the budget minus the protected reserve, with a minimum of zero. Whole attempts equal the spendable amount divided by the entered cost, rounded down. The remainder stays visible so you can see what another attempt would require.