The above lists practically supply the rules of gender
for the Sanskrit noun. These may be summarized as follows.
Speaking generally, all stems ending in the long vowels ā,
ī, ū, are feminine; stems ending in a, t, n, may be
masculine or neuter; stems ending in i or u may be of any
gender.
a. Feminine are all stems formed with the suffixes ā, ī,
ū, tā, trā, ti.
b. Neuter are all stems formed with the suffixes tva, ru,
is, us, aud (unless the name of a living being) as,
and (unless meaning an agent) ana.
c. Masculine are (in so far as they are not used adjectivally)
all stems formed with the suffixes ta, va, yu;
āyana, i (patronymic), ka, bha, la.
d. Masc. or fem., are stems formed with the suffixes ni,
nu, mi, tṛ; also stems formed with the bare root (neuter
also if adjectives).
e. Masc. or neut. are stems formed with the suffixes a,
tha, na, una, ma, ya, ra, tya, tra, tu,
an, man, van; also the adjectives formed with in,
vin, īna, īya, tana, tama, tara, maya,
mat, vat.
f. Masc., fem., or neut. are stems formed with i or u.
Based on MacDonnel 183, page 165-166
https://archive.org/stream/in.ernet.dli.2015.68144/2015.68144.A-Sanskrit-Grammar-For-Studentsed2_djvu.txt