40 Then the LORD said to Moses, "Number every firstborn male of the sons of Israel from a month old and upward, and make a list of their names. 41 "You shall take the Levites for Me, I am the LORD, instead of all the firstborn among the sons of Israel, and the cattle of the Levites instead of all the firstborn among the cattle of the sons of Israel." 42 So Moses numbered all the firstborn among the sons of Israel, just as the LORD had commanded him; 43 and all the firstborn males by the number of names from a month old and upward, for their numbered men were 22,273.
44 Then the LORD spoke to Moses, saying, 45 "Take the Levites instead of all the firstborn among the sons of Israel and the cattle of the Levites. And the Levites shall be Mine; I am the LORD. 46 "For the ransom of the 273 of the firstborn of the sons of Israel who are in excess beyond the Levites, 47 you shall take five shekels apiece, per head; you shall take them in terms of the shekel of the sanctuary (the shekel is twenty gerahs), 48 and give the money, the ransom of those who are in excess among them, to Aaron and to his sons." 49 So Moses took the ransom money from those who were in excess, beyond those ransomed by the Levites; 50 from the firstborn of the sons of Israel he took the money in terms of the shekel of the sanctuary, 1,365. 51 Then Moses gave the ransom money to Aaron and to his sons, at the command of the LORD, just as the LORD had commanded Moses.