This is how it is calculated.
Gross income – medical and dental insurance premiums HSA contribution – Uniform allowance = Income that these taxes based on.
6.2 % goes to social security
1.45% goes to Medicare
For Example
Gross income 4,000
medical and dental insurance premium 200
HSA Contribution 200
Uniform allowance 0
4,000-200-200= 3,600
6.2 % of 3,600= 223 to social Security [ Until you reach yearly maximum 7,886.4 ]
1.45 % of 3,600 = 52 to Medicare. [No max amount for this.]
Total of 7.65 % goes this route.
Best book to read before you start investing.
The Simple Path to Wealth: Your roadmap to financial independence and a rich, free life
I like audiobook versions of this book