This is a port of Zer0’s melee damage formula by @Voshy. Not my work!!
The archive version is here.
I’ve done some minor edits : mostly spelling and formatting, but also updated Deathmark stacking as it changed after the 2015 patch.
Hi everyone. If you ever played Zer0, you probably wondered how are bonuses for all of his melee skills, relics and COMs calculated, as did I. Apparently nobody had enough time or will to test it all out so far, so only thing we got on this forum is “passive skills before, active skills after”, which is completely wrong.
I am writing this thread to let you all know that we took 3 days to test everything and now we have a real formula with all skills, relics, COMs, weapons and BAR.
In our testing we encountered some wierd things that also nobody mentioned before. For example slag multiplier changes depending on number of players, death mark can stack up to 320% with 4 assassins and so on. I will mention all of that later.
Another quick note, complete melee formula is very complicated and a bit ****** up. We tried to make it as simple as possible by combining it into only one formula (altho relic for example has his own thing going on), but some explanation will be needed to understand it.
So, here comes the formula:
(base+roid) * Ambush * Backstab * Killing Bl0w * [ weapon bonus * ( %Decepti0n + %Ir0n Hand + %C0unter Strike + %Rising Sh0t + %Be Like Water + %F0ll0wthr0ugh + %Like the Wind + %COM + %BAR ) + 0.RELIC ] * Execute * slag * crit * Deathmark
So let’s explain it from beginning. To make it simpler I divided the formula into different color parts.

Base  base melee damage for your level.
 For level 50 : 9015
 For level 61 : 34580
 For level 72 : 132,641
 For OP8 : 158,678 effectively, factoring in average DR [ed.  OP8’s damage reduction varies between foes’ individual level. See here for DR info]

Roid  roid damage from your shield, IF IT’S DEPLETED. You can find roid number on your shield’s weapon card.

Ambush, Backstab, Killing Bl0w, weapon bonus  all of these values are calculated the same. All of them come in percentages and you have to make a multiplier our of a percentage. That is done by taking the percentage, dividing it by 100 and then adding 1.

For example if we have +20% from Ambush , it’s pretty logical that multiplies the number before by 1.2. If you have +200% from weapon (Rapier) then that’s means x3.

All of this mentioned skills values can be changed by class mods and depend on how much points you have in that skill. For example if you look at the formula, Backstab with 5 points in it will add 40% or a multiplier of 1.4 to everything else. If you have a class mod with +6 Backstab then it will add 88% or multiply everything else by 1.88.

Note: you will always get an Ambush bonus when hitting from Decepti0n.

Ok, now the green stuff.

%Decepti0n, %Ir0n Hand, %C0unter Strike, %Rising Sh0t, %Be Like Water, %F0ll0wthr0ugh, %Like the Wind, %COM, %BAR  All of this values are calculated the same. Percentages are added together, and then the multiplier is made from the SUM of all multipliers.
 So for example, last second Decepti0n will add 650%, Ir0n Hand will add 15%, C0unter Strike will add 250% and BAR will add 10%. In this example we don’t trigger Rising Sh0t , F0ll0wthr0ugh , Like the Wind , or wear a +melee COM just to make it simpler. In this case we will add all the percentages we have : 650+15+250+10=925%. Then we will make a multiplier out of it just as we did before. 925% means x10.25.
Now the thing that made us go crazy : the relic. In practice, relic adds at the same time as weapon bonus. So for example a rapier and +35% melee relic will add +235% at once. But then the “fun” begins. Ambush, backstab and killing blow will behave like that bonus damage exists, but all of our green skills will behave like all before happened without a relic. Basicly relic has its own formula that calculates the bonus damage relic woud do before the green stuff and then just adding that number. We wanted to get it all in one formula so it looks better and thats wh formula has 2 brackets and it’s a bit more complicated. Now to explain how to add relic in this formula:
 0.RELIC  means that although you have a relic that says +35%, you want put 1.35 as a multiplier here, you will just replace the blue part with 0.35. I know it makes no sense now, but if needed I can later explain the seperate relic formula and how it was added into the original formula. Basicly for calculations all you need to know that 30% relic means blue part is 0.30. +35% relic means blue part is 0.35.
And last, but again not so simple, a pink part.

Execute  this one is simple : Execute will always add +100% wich means a multiplier of x2.

Critical  again a simple one : crit gives us +100% again, so another x2 multiplier.

Slag  this is where it gets interesting. In our tests we found out that slag doesn’t always double your damage. In fact, slag multiplier depents on number of players. If playing solo, slag really does add 100% (multiplier x2) on normal and TVHM, and 200% (multiplier x3) on UVHM. But:
 NORMAL AND TVHM
2 players = slag does +95% = multiplier 1.95
3 players = slag does +80% = multiplier 1.8
4 players = slag does +75% = multiplier 1.75  UVHM
2 players = slag does +192.5% = multiplier 2.925
3 players = slag does +170% = multiplier 2.7
4 players = slag does +162.5% = multiplier 2.625  Not sure how nobody noticed this before. This has nothing to do with melee, slag just loses efficiency with more players, period.
 NORMAL AND TVHM

Death Mark  another interesting part of the formula. Deathmark officially adds 20% or a multiplier of 1.2. But, if adding Deathmark with kunai, it can stack up to 4 times to 80%. Throwing kunai fast helps stacking it BUT DOES NOT GUARANTEE IT.
For the end, there is another, a bit longer way to write this formula that makes looking at every percentage bonus the same. I will put it here so if anyone finds that one simpler to use, go ahead.
Same formula in different shape:
(base+shield) * (1+Ambush) * (1+Backstab) * (1+Killing Bl0w) * [ (1+weapon bonus) * ( 1+Decepti0n + Ir0n Hand + C0unter Strike + Rising Sh0t + Be Like Water + F0ll0wthr0ugh + COM + BAR ) + RELIC ] * (1+Execute) * (1+slag) * (1+crit) * (1+Deathmark)
To use this one, you just need to consider every percentage as a percentage of 1. So 35% = 0.35. 20% = 0.2. 650% = 6.5. The advantage of this formula is that you just insert all the percentage bonuses in the exact same way, and formula does everything else for you.
So there you have it. A complete melee Zer0 formula. It would be nice if this was linked in some general Zer0 guide so everyone can see it. We can finally calculate our melee damage, and I’m sure alot of Zer0 players will be happy.
For the end I want to thank some guys that were patient enough to spend almost 20 hours with me testing every single possibility and doublechecking everything. Firstly Alade, a guy who was with me helping with this almost all of that time. Then @StrikerZidane, a terrorist we love so much who I kept awake for hours because he still has a Marcus dummy that can be killed so I can test Killing Bl0w and kill skills. And finally @Blackadder, a math professor that wanted to play and I made him work on the formula to make it look nicer.
Also, tnx to Goth and Bahroo for helping test Deathmark with 4 assassins.
Conclusion: Ambush, Backstab and Killing Bl0w are the sh1t. Whoever gets to this part after so much text, gets a cookie from me.