Link to the Spreadsheet.
First of all, credit where credit is due:
Much of the design/layout of the spreadsheet is inspired by the original Tanking Spreadsheet by LagunaD.
It has unfortunately fallen out of date, so I wouldn't recommend trying to use it.
Basic stat formulas all come from this thread over at mmo-mechanics.com.
Several of the numbers, such as the percentage of attacks that are MR+KE vs FT+KE, the average value of Shadow's Kinetic Bulwark, the fact that many boss attacks only have 90% accuracy, and many more numbers and facts, come from the fantastic threads posted by KeyboardNinja and Dipstik, as well as many other contributors to those threads. Those threads can be found:
Here for KeyboardNinja's.
Here for Dipstik's.
How to use the Spreadsheet:
The first thing you are going to want do do in sign in to your google account (or make a google account). Then click File > Make a Copy. Go ahead and name it whatever you want. When the copy opens, it should now be editable by you.
The first thing you want to do is input your stat ratings into row 3. These ratings come from your character sheet. Make sure your tanking stance is on, and you remember to include the defense rating you get from your endurance stim. The stats entered by default are my current stats.
The second thing you are going to want to do is fill out your base stats in row 7. The base stats for each class are listed for you at the bottom left corner of the spreadsheet. These base stats assume an optimal talent build, as well as several in combat buffs/debuffs that are described in detail lower in this thread. The values entered by default are for a Shadow tank. For the acc. and damage debuffs, use the default 0.05 if your raid comp has these debuffs, use 0 if your raid comp does not have these debuffs. Acc. debuff comes from Shadow tank and Guardian tank, damage debuff comes from Shadow Tank, Vanguard tank, and possibly Watchman Sentinel if they spec into it.
The only other number you should ever change is A14, which is 0.79. This number is the percentage of attacks (so 79%) that bosses use on your that are melee/ranged attacks, ie dodgeable attacks. This number is important. If you assume all attacks are dodgeable you would incorrectly over inflate the value of defense. 79% is the average of all bosses in HMSV. This number will very likely change in future content, so be sure to come back here to find out what it changes to in the future. For now though, leave it at 0.79.
And that's it! That's all the numbers that you should have to enter. You should now see the percentage of enemy damage you take in cell A14. More importantly, you should see your stat weights for your current gear in row 27.
The goal of tanking is to get as many mitigation stats are you reasonably can (without sacrificing too much endurance). You then want to balance those mitigation stats properly, which is where row 27 comes in. You are optimized when these numbers are equal. Whenever you add a stat in row three, the stat weight for that stat should go down. For example, lets say you increased your defense rating by 100 in cell B3. The value of B27 should go down. You want to fiddle with the stats in row 3 until you get the values in row 27 as equal as possible. Note that for Shadows and Guardians, you will never be able to get your shield rating low enough (at last at current gear levels), so the stat weight for shield is always going to be lower than the stat weights for defense and absorb. That's just how the itemization works in this game, and there is nothing you can do about it.
Where the base stats come from:
All tanks get defense +5% from the fact that enemy attacks can either have 90% accuracy or 100% accuracy. A 50/50 split is assume, thus 95% accuracy, thus the 5% defense bonus.
Damage reduction: 0.02 from Jedi Resistance + 0.02 from 4-piece = 0.04
Defense: Base of 0.10 + Enemy accuracy bonus of 0.05 + Double-bladed Saber defense 0.04 + Shadowsight 0.02 = 0.21
Shield: 0.15 from tanking stance + 0.05 from equipping a shield + 0.20 from Kinetic Ward with 2-piece set bonus = 0.4
Absorb: 0.2 from equipping a shield + 0.04 from Impact Control + 0.036 from Kintetic Bulwark (on average) = 0.276
Force/tech resist: 0.02 from Shadowsight.
Damage reduction: 0.06 from tanking stance + 0.03 from Guardian Slash = 0.09
Defense: Base of 0.05 + Enemy accuracy bonus of 0.05 + 0.05 from Blade Barricade + 0.03 from Single Saber Mastery = 0.18
Shield: 0.15 from tanking stance + 0.05 from equipping a shield + 0.04 from Shield Specialization = 0.24
Absorb: 0.2 from equipping a shield
Force/tech resist: 0.05 from Blade Barricade
Damage reduction: 0.05 from tanking stance + 0.02 from Ion Shield + 0.02 from Power armor = 0.09
Defense: Base of 0.05 + Enemy accuracy bonus of 0.05 + Deflective Guards gives 0.04 + 4-piece set bonus gives 0.02 = 0.16
Shield: 0.15 from tanking stance + 0.05 from equipping a shield + 0.02 from Shield Cycler = 0.22
Absorb: 0.2 from equipping a shield + 0.04 from Ceramic Plating + 0.15 from Power Screen/Energy Blast (on average) = 0.39
Force/tech resist: 0.02 from 4-piece set bonus
How all the math works:
The equations used to find row 11 just plug your stat ratings into the stat formulas, then add your base stats on top.
A17, your damage taken, comes from the equation:
(MR * (1-D-AD) * (1-S*A) (1-DR) * (1-DD)) + ((1-MR) * (1-S*A) * (1-FTR) * (1-DR) * (1-DD))
MR=% of attacks that are melee/ranged
Row 21 tells you what your stats would be if you added one rating to that stat. Its basically "your stats +1" plugged into the stat equations, plus base stats.
Row 24 is what your total damage taken would be with 1 more stat rating for the corresponding stat. It uses the same equation at A17, but uses the respective value from row 21 instead of row 11.
Row 27 (the stat weights) come from the difference between row 24 and A17, aka how much more total mitigation you get by adding one to each particular stat. This value is then multiplied by 100,000 so that it spits out easy to read numbers.
One final note. The value A27, the stat weight for armor, is fairly worthless information because it doesn't take into account any armor multipliers you have from talents and your tanking stance. This doesn't really matter though as you get armor naturally, and you can't trade armor for any of the other tanking stats anyway.
Acc/Dmg debuffs have been removed from base stats and given their own separate cells. Should be pretty self explanatory, and there is a brief explanation in the spreadsheet.
Dmg debuff is now treated as a separate effect that multiplies boss damage by 0.95*, rather than just adding 0.05 to your damage reduction.
*Technically its multiplied by (1-DmgDebuff), which is (1-0.05)=0.95 by default.