The categories are based pretty much on just value. Some nobles also have specific requirements for furniture.
So, to calculate a rooms value, you just add up the value of everything in it, everything the floor tiles are madde of (times their smooth/engraving multiplier), everything the walls are made of (Times their multipliers) and then divide the total by either x or y, where x is the number of rooms that overlap the entire space, or where y is 2^number of rooms overlapping.
Keep in mind partial overlaps only affect the partial bit. So a masterwork statue can be split in half value wise if you place it as below:
#########
#B S B#
##D###D##
And then make each bedroom 4x1, including the bed and the statue. Also note that the wall above and below the statue would be split too.
In general, rooms that share at least one piece of furniture with other rooms are only 1/4 of the value that would result without other rooms interfering.
That's about it.
Your calculation would be more appropriate and it is very nice indeed, but it isn't implemented this way, because Toady One has other things to do, like implementing dwarves and fortresses and magma and goblins and sieges and elves and fire and history and insanity and awesome and epic and spoilers and... vegetable oil. Also, as far as I know, shared walls do not trigger splitting.