In an ideal no-loss model mix 200 g of water at 20 C with 100 g at 80 C. The mass-weighted model gives 40 C, not the unweighted 50 C.

The worked example

Calculation
(200 * 20 + 100 * 80) / 300 = 40

These are constructed inputs. Displayed decimals are rounded; they are not product measurements.

Understand the result before using it

The warm portion has half the mass of the cool portion, so it cannot pull the equilibrium all the way to the unweighted midpoint. In the ideal water-only model, the 200 g portion gains 20 degrees while the 100 g portion loses 40 degrees: the mass-times-change terms balance.

If the masses were equal, the same model would give 50 C. If both portions started at the same temperature, changing their masses would not change that temperature. These are useful consistency checks before substituting numbers. Different materials require their heat capacities as well as masses. A cup initially at room temperature absorbs heat too, so measuring a real mixture does not test only the water equation.

The boundary of this calculation

Container heat, evaporation and different materials invalidate the simple model. This is not a safe-temperature instruction.

Inspect the example inputs and run the Python checks. They use only the published examples and do not read personal folders.