Stop distance is the denominator in every sizing formula. It should come from the chart or from volatility - a level that invalidates the idea - and not from how much you happen to want to lose.
Once it exists, size is mechanical: shares = dollar-risk / stop distance. Entry $40.00, stop $38.50, distance $1.50. Entry $40.00, stop $39.60, distance $0.40, which buys 3.75x more shares for the same money at risk. This is why a tight stop is not automatically "less risky": the position grows to compensate, and a tighter stop is hit more often.
In other instruments the unit changes but not the logic. Futures use ticks times tick-value; forex uses pips times pip value; options usually need a modelled loss rather than a price distance, because the premium does not move one-for-one with the underlying.
Related: dollar-risk, share-sizing-formula, atr-position-sizing