Bamidbar / Numbers 31:28
וַהֲרֵמֹתָ מֶכֶס לַיהוָה מֵאֵת אַנְשֵׁי הַמִּלְחָמָה הַיֹּצְאִים לַצָּבָא אֶחָד נֶפֶשׁ מֵחֲמֵשׁ הַמֵּאוֹת מִן־הָאָדָם וּמִן־הַבָּקָר וּמִן־הַחֲמֹרִים וּמִן־הַצֹּאן׃
And levy a tribute for the Eternal from the men of war who went out to battle: one soul of five hundred, of the persons, and of the cattle, and of the donkeys, and of the flocks.
Pshat פְּשָׁט
One of five hundred
Chizkuni: the soldiers toiled in the war, so less was taken from them. Malbim: one fiftieth of the people went to war, so the congregation gives the Levites one of fifty, since victory came through the Levites' prayer too. One of five hundred is a tenth of that, like the tithe the Levites give the kohen. The tribute to Elazar (Eleazar) the kohen reminds the soldiers that they did not win by the sword.
How Chizkuni and Malbim explain it
Remez רֶמֶז
The hidden alef
Ohev Yisrael: Israel is the host of the Eternal, and the name Tzevaot (Hosts) is 499 in gematria. Add one hidden letter alef, the sign of the Master of the world, and it is 500: victory came from Him. One of fifty from those at home matches the forty-nine letters of the "Shema". Kitzur Ba'al HaTurim: the word "prey" leads to a verse in Isaiah: you took prey from the mighty, so give of it to the Eternal.
How Ohev Yisrael and Kitzur Ba'al HaTurim explain it
Drash דְּרָשׁ
The share of the one who stayed
Midrash Lekach Tov: the law of dividing spoil between soldiers and those who stayed behind was in Israel from the days of Moshe (Moses). David did not invent it but renewed and fixed it, standing against wicked men, so the law bears his name. Whoever renews a forgotten commandment is as if he received it at Mount Sinai. And the tribute to the Eternal goes to the kohen: the kohanim receive only from the table of the Most High.
How Midrash Lekach Tov explain it
Sod סוֹד
The ox and the sheep
Shem MiShmuel: the ox is an image of pride, the sheep an image of humility. Neither trait is praiseworthy unless it is in holiness. Pride in holiness: not to be ashamed of serving the Eternal even when mocked. Humility in holiness: to submit to the Eternal and His Torah, not to bow before the wicked. Therefore offerings to the Eternal come from both animals.
How Shem MiShmuel explain it