IMO they don't 'work it out' they takeawildstabinthedark guess. They (midwives, ultrasound people, doctors) seem to be notoriously wrong about predicting weights judging by other posts! How can they tell at only 15 weeks??!
I was apparently heavier than my brother (I was second baby) but DD (2nd) was lighter than DS and she was 9 days overdue.
Lol im hoping they get smaller also. At the mw yesterday she wasnt going by measurements of me or anything she was going though my notes and commented on the weight of my other dc and then went on to say that this one will prob be larger than the previous 2!! talk about being putting the fear of god in me!
oh and apparently DS3 was going to be a "tiny baby" - ok 7lb 5oz isn't huge in the grand scheme of things, but for me (a petite 5fter) a pretty decent size, especially as he was 3 weeks early (mind you all 3 of mine made up for it in length all being around really long )
1st was 13 days late, 2nd i have no idea as only knew about 6 weeks, though they did say 1st would be very small, under 6lb and had growth scans every 2 weeks and with my 2nd they told me he was going to be big and measuring 9lb on the scan and he was born a week later. They did say though that he was 'around' 3 weeks early by his appearence and he wasn't a late baby so i think he would have been bigger then my 1st.