First of all, in your quote, Madison is talking about a federal standing army, NOT a Militia.
Second, he's estimating that the largest standing army that can be carried (I assume he means afforded) is 1/100th of the entire population (or 1/25th of those in the population who are eligible to carry arms).
He then compares that small number to the large number of those in a Militia who would oppose them.
When Madison wrote "one twenty-fifth part of the number able to bear arms", the number able to bear arms is not a federal standing army or the militia. It is a large number of people than either of those.
“Americans have the right and advantage of being armed - unlike the citizens of other countries whose governments are afraid to trust the people with arms.” - James Madison
“The Constitution preserves the advantage of being armed which Americans possess over the people of almost every other nation where the governments are afraid to trust the people with arms.” - James Madison
I’d say Madison is very clear. The right to bear arms is for americans/citizens/people, and for possible confrontation with a government/standing army, including the government he was putting in place.
The foundaer were wary of governments and standing armies.
Americans have the right and advantage of being armed - unlike the citizens of other countries whose governments are afraid to trust the people with arms. - James Madison
The Constitution preserves the advantage of being armed which Americans possess over the people of almost every other nation where the governments are afraid to trust the people with arms. - James Madison