Welcome to the Daily Halacha. We learned that a person cannot measure things on Shabbat or weigh things on Shabbat. So what is the halacha (Jewish law) regarding a baby's bottle, where you can see the amount of ounces you need to put in the bottle? Or let's say a person needs to take Tylenol or medicine on Shabbat, and you can't just give them any amount. You have to literally measure exactly how much Tylenol or medicine you're giving the person, whether it's an old man or a child.
And what about on Pesach, where a person has to have at least a kezayit (an olive-sized amount) of matzah (unleavened bread), and you have to measure exactly how much a kezayit of matzah is? You might measure with a ruler, or weigh the matzah. Is that allowed on Shabbat and on chagim (holidays), on Yom Tov (festival day)? Yes or no?
The Yalkut Yosef says that if you want to measure how much medicine to give a person, even though measuring on Shabbat is not allowed, as we learned before, the Chachamim (Sages) allow measuring on Shabbat for a person who is not well. Otherwise, it's not allowed. But because we're doing it for a person who is a choleh (ill person), and you can't just give them any amount of Tylenol, you should try your best to give him approximately the amount you know he needs. But if you want to be extra careful and use the actual measurement on the cup that shows the number of ounces, then you're allowed to use it on Shabbat.
Similarly, when it comes to a baby's bottle, a parent or whoever is making the food should try to estimate about how much they need in the bottle without using the numbers and measurements on the bottle. But if they obviously need it, they're allowed to measure using the numbers on the bottle on Shabbat. Even though measuring is not allowed, a person is allowed because we're doing it for a child.
Similarly, when it comes to measuring the amount of matzah you want to have on Pesach, or if a person wants to weigh something—for example, if a person can't have so much challah (bread) on Shabbat but is allowed to have a certain amount—the nutritionist, the doctor, tells him, “You're allowed to have only what you need when it comes to bread when you eat on Saturday, when you eat on Shabbat.” So is he allowed to weigh the challah to have exactly the amount she needs according to halacha, and the amount she can have according to the doctor? The answer is yes. The halacha is that a person should have for sure a kebeitzah (an egg-sized amount) on Shabbat, or, if he can't have a kebeitzah, he should have a shiur kezayit (an olive-sized measure) on Shabbat, and he's allowed to measure it on a scale. Obviously, we're not talking about an electronic scale. But because he's doing it for his health, we can consider that a tzorech mitzvah (a mitzvah-related need); he's allowed to weigh the amount of bread he's having on a non-electronic scale.

