if odds r -400 you have bet 400 to win 100 but what do you win if you bet 20

How do you calculate what you win besides the same example always used like if -200 u have to bet 200 to win 100 what if odds r -200 an you bet 50 dollars what do u when an how did u figure it ?

wonAmount = bet / (-odds) * 100

100 = 400 / -(-400) * 100

And with 20 you’d win
5 = 20 / -(-400) * 100

Allthough with the little info you are giving, you could easily come up with many other formulas that produce 100 from 400 and -400, and produce different values with 20