I. Your Attitudes (Extraversion vs Introversion)
Which Worlds Are You Often, Outer or Inner?
Which worlds do you prefer to be in? Where do you spend your energy the most?
Extraversion (E) - Your Outer World
Your preference which tends to enjoy human interaction, enthusiasm, assertiveness, and talkativeness.
Introversion (I) - Your Inner World
Your preference where your energy tends to reflect and dwindle during human interaction.
II. The 4 Major Cognitive Functions
How You Gather Information and Make Decisions
Your 4 major Cognitive Functions are either categorized as Perceiving (Intuition and Sensing) or Judging (Thinking and Feeling)
Perceiving
Perceiving functions help you gather and organize information
Intuition (N)

Your Intuition function helps you understand meaning and patterns of information. It has to do more with symbols or abstract theories.
Sensing (S)

Your Sensing function focuses on your physical reality, what you see, hear, touch, taste and smell. Attention goes more into the present moment and reality.
Judging
Judging functions help you make decisions
Thinking (T)

Your Thinking function puts greater emphasis on facts and objective data and puts more weight on impersonal facts.
Feeling (F)

Your Feeling function is more likely to consider personal concerns and people to care about and their point-of-view.
III. The 8 Cognitive Functions
How You Process Information In Different Worlds
If we mix-and-match your extraverted and introverted worlds along with your perceiving and judging preferences, 8 different combinations of Fognitive functions are available according to Jung.
Toggle the dropdown to read every function in detail
Intuition (N)
Extraverted Intuition (Ne)

Introverted Intuition (Ni)

Sensing (S)
Extraverted Sensing (Se)

Introverted Sensing (Si)

Thinking (T)
Extraverted Thinking (Te)

Introverted Thinking (Ti)

Feeling (F)
Extraverted Feeling (Fe)

Introverted Feeling (Fi)

IV. The Function Stack
Your Favorite Functions and Some You Don’t Like To Use Often
There are functions we prioritize and likes to use often. Due to this prioritization we end up deprioritize other functions.
Primary functions are your 4 major functions and ordered according to your preference. This order is called the Function Stack.
Shadow functions are the hidden and unconscious function (the darker and smaller portions of the chart), which has not been covered as of the moment.
Primary Functions
1) Dominant (Dom)

Your strongest function you use often you might not realize you use it at all. The first function in the function stack.
2) Auxiliary (Aux)

Your second strongest function which helps and assist your dominant function.
3) Tertiary (Ter)

Your third function is considered to be under-developed but develops as you mature.
4) Inferior (Inf)

A fourth function that comes out mostly when you’re under stress. This is also your most insecure function lies.
V. How do the Cognitive Functions determine the 4 letter MBTI code?
Putting it all together
The Myers-Briggs Type Indicator (MBTI) was created and derived from the theory of psychological types described by Carl Jung. It's goal is to make the cognitive functions more understandable.
Using the chart, we can easily variations and differences in priorities in using your Cognitive Functions.
How are the cognitive functions being derived to the 4 letter MBTI?
1st letter (E or I) - which attitude?

Is your Dominant function Extraverted (E) or Introverted (I)?
2nd letter (N or S) - which Perceiving function?

Is your Dominant or Auxiliary function Intuition (N) or Sensing (S)?
3rd letter (T or F) - which Judging function?

Is your Dominant or Auxiliary function Thinking (T) or Feeling (F)?
4th letter (P or J) - what function type?

Is the type of dominant function you have Perceiving (P) or Judging (J)? For the Introverted function, it is determined by the auxiliary function.