Another interpretation: WHEN YOU TAKE A CENSUS [of the Children of Israel, each shall give a ransom for his life] (Exodus 30:12), SO THAT NO PLAGUE COME UPON THEM. When Moses heard this, he was afraid, and he said, "Skin for skin! All that a man has he will give for his life" (Job 2:4). Rabbi Judah son of Rabbi Ila'i said: Moses said, "We have already found that the ransom of a person's life is a talent of silver, as it is stated, 'Then your life shall be for his life, or you shall weigh out a talent [of silver]' (I Kings 20:39)." Rabbi Yochanan said: From whom did he learn it? From the one who brings forth an evil name, as it is stated, "And they shall fine him a hundred pieces of silver" (Deuteronomy 22:19). And we brought forth an evil name against the Holy One and said, "These are your gods, O Israel" (Exodus 32:4); each and every one of us must give a hundred pieces of silver. Resh Lakish said: Moses learned it from the rapist. It is written concerning the rapist, "Then the man who lay with her shall give [to the young woman's father fifty pieces of silver]" (Deuteronomy 22:29); and we have raped the word, for it is written, "You shall have no [other gods]" (Exodus 20:3), yet we committed idolatry; each and every one of us must give fifty pieces of silver. Rabbi Judah bar Simon said: Moses learned it from the goring ox, as it is stated, "If the ox gores a male slave [or a female slave, he shall give thirty shekels of silver to his master]" (Exodus 21:32); and we exchanged His glory for an ox, as it is stated, "And they exchanged their glory for the likeness of an ox" (Psalms 106:20); each and every one of us must give thirty shekels. The Holy One knew what was in Moses' heart. He said to him, "By your life, neither a talent of silver, nor a hundred pieces of silver, nor fifty shekels of silver, nor thirty shekels, but THIS they shall give" (Exodus 30:13).
Moses Weighs the Ransom for a Soul After the Golden Calf
Midrash Tanchuma Buber, Ki Tisa 6:1
ד"א כי תשא (וגו'] ולא יהיה בהם נגף. כיון ששמע משה כן נתיירא ואמר עור בעד עור וכל אשר לאיש יתן בעד נפשו (איוב ב ד), אמר ר' יהודה ב"ר אלעאי אמר משה כבר מצינו שפדיון נפשו של אדם ככר כסף, שנאמר והיה נפשך תחת נפשו או כר [כסף] תשקול (מ"א כ לט), ר' יוחנן אמר ממי למד ממוציא שם רע, שנאמר וענשו אותו מאה כסף (דברים כב יט), ואנחנו הוצאנו שם רע על הקב"ה, ואמרנו אלה אלהיך ישראל (שמות לב ד), כל אחד ואחד ממנו צריך ליתן מאה כסף, ריש לקיש אמר מן האונס למד משה, כתיב באונס ונתן איש השוכרב עמה [לאבי הנערה חמשים כסף] (דברים כב כט), ונחנו אנסנו את הדיבור, שכתיב לא יהיה לך [אלהים אחרים] (שמות כ ג), ועשינו ע"ז, כל אחד ואחד ממנו צריך ליתן חמשים כסף, ר' יהודה בר סימוחן אמר משור נגח למד משה, שנאמר אם עבד יגח השור [או אמה כסף שלשים שקלים יתן לאדוניו] (שמות כא לב), ואנחנו הרמנו כבודו בשור, שנאמר וימירו את כבודם בתבנית שור (תהלים קו כ), כל אחד ממנו צריך ליתן שלשים שקל, ידע הקב"ה מה בלבו של משה, א"ל חייך לא ככר כסף, ולא מאה כסף, ולא חמשים שקלים כסף, ולא שלשים שקלים, אלא זה יתנו.