How to calculate
Rotate the ordered chord tones so the selected degree comes first. Move each remaining note up an octave as needed to keep the notes ascending.
Worked example
Use Chord root and optional octave C4 · Chord quality Major · Inversion number (0 for root position) 1. The result is E4, G4, C5.
Input and result notes
Inversion zero starts with the root. First inversion starts with the second chord tone, usually the third. The highest inversion is one less than the number of chord tones.
University of Minnesota Pressbooks guide to chord inversions