Does your standard deduction apply to your calculated annual income for short term capital gains?

Suppose my annual income is at $56,000 for 2020 and I am filing as a single tax filer, which would entitle me to a $12,400 standard deduction. Can that $12,400 be subtracted from my $56,000 income to bring down my owed taxes in short term capital gains (as my annual income would only be $43,600) or does the standard deduction not apply when calculating capital gains?

 

Example: If I traded a stock  with an initial value of $100 and sold it for a value of $1,000. I have a short-term capital gain of $900. Would my capital gains tax be $248 if the standard deduction didn't apply or $158 if the standard deduction applies.

Tax TypeMarginal Tax RateEffective Tax RateTax Amount
Federal22.00%22.00%$198 or $108
NJ State5.53%5.53%$50 or $50
Local0.00%0.00%$0
Total Capital Gains Taxes $248 or $158

 

Please let me know if I my calculations are accurate for this example. Thank You!