Calculating RoR given 3 basic Variables

1. Dec 26, 2011

An Indiot

So I want to calculate Risk of ruin from this 3 variables.
Capital
Unit of Investment
ROI per Unit
for simplification purposes let's assume it is a double or nothing scenario.
I have only gotten this far.
RoR to double up=100%-[Equity + (Roi.Equity)]

This only applies when Capital= Unit of Investment
I don't know what a full formula including capital and unit of ivesment variables would be.
And what would the formula to calculate more advanced RoR values like RoR when your objective isn't to double up but to 1000x.
Thanks
What would the correct formula be?