The main breaker is sized to trip before the total current draw of the panel exceeds either a) the current carrying capacity of the feed from the electric company, or b) the current carrying capacity of the breaker panel bus bar, whichever is less. So if you order a 100 amp service and your breaker panel is rated for 120 amps, then your main panel should have a 100-amp breaker at the top.
The breakers for the branch circuits are rated to prevent the branch circuit from drawing more power than the branch circuit wiring can handle.
If you look at your panel and do the math, it is very possible that the branch breakers have a total capacity greater than the rating of the main breaker. This is fine because you will typically never have everything drawing it's maximum rated current.
Breakers protect wires. The wire to the sub-panel can only be protected by the breaker in the main panel, and that must be correct for the wire's type and size.
Like Ed Beal says, you don't need a master breaker in a sub-panel. The breaker in the sub-panel wouldn't protect the wire to the sub-panel. It protects the sub-panel itself, which is listed for 200A. It can also be nice if you ever get sick of paying the tenant's electric bill and have the electric company feed a separate meter to that panel - voila, the master breaker is there already!
(I'm saying "master breaker" to avoid saying "main breaker", which might be confused with "breaker in main panel".)
If you are hoping for the sub-panel breaker to trip before the main-panel breaker, that doesn't work. Breaker trip curves are complex and unpredictable.
If the 100A breaker is not listed or labeled to work in the 200A panel, then you cannot use it, end of subject. That's the law.
This is a situation where buying from a proper electrical supply house (and not a big-box home improvement store) will be very helpful. You tell them what you want, they will sell you the right thing in the first place, and stand behind the combo. On price, for the behind-the-counter stuff, I find them more than competitive with big-box. Their customers are, after all, electricians who deal in volume and drive past 3 big-box stores to buy there. (Electrical supplies do tend to wildly overprice the impulse-buy grab-candy at the front of the store, so don't go off those prices.)
Best Answer
The only "calculation" is "how many circuits are expected to draw how much, at the same time" - and if it's more than 200 amps, you'll need a bigger main, or two 200A panels, or something like that.
It's quite normal to have far more than 200A of breakers attached to a panel with a 200A main. Whether that ever becomes a problem of tripping the main is a matter of use patterns. As an example, it's rare for an electric range to have all burners and the oven on full power, at the same time.
Likewise, many 15 and 20 amp lighting and outlet circuits are rarely fully loaded.
Breakers (and wire) for "continuous" circuits are derated, so they only draw (at most) 80% of the rated breaker amps (breaker is sized for 125% of load - the math works out) if correctly sized.
Most appliances that get a dedicated circuit call for a breaker considerably larger than the actual running current. Starting currents may be much higher, but are rarely if ever applied to all circuits at the same time.
On the other hand, if you had 10 20-ampere electric resistance heating circuits (drawing 16 amps per derating) that would be all you could put on one 200 amp main (as the entire load is continuous) other than some load that would not turn on at the same time (say a big honking air conditioner, if the control systems are sane and don't run heat and A/C at the same time).