The problem with your calculation is, wheel width is defined as "the measurement from the inside of the outer tire bead lip to the inside of the inner bead lip. Your calculation would be "off" by 1/2". I'm sure what you meant by "wheel width" was the total distance across the wheel (outside edge to outside edge) but that requires someone to interpret what you meant by wheel width. The problem I have with the diagram above is, wheel width and rim width are interchangeable terms. You're always better off measuring wheels the way wheel manufacturers do.
Offset = (backspace minus 1/2") minus half of the wheel width, converted to millimeters. As an example, an OEM 15" x 8" campy has 5-1/4" backspacing. To convert the backspacing to offset, the equation is: (5-1/4" - 1/2") - 4" x 25.4 = 19mm (actually it's 19.05mm but offset is always rounded to the nearest mm).
The single most mis-understood aspect of wheel measurements (and there are many) is how to adjust your measurements for a tire bead lip that's less than 1/2" thick. For the purposes of calculating backspacing, you always assume your tire bead lip is 1/2" thick, even if it's not. That's the industry standard. As an example, If HRE made an 8" wheel for the front of a Pantera and used OEM backspacing specs (5-1/4" BS), the backspacing would actually measure 5" if you measured it with a tape measure, because HRE's "lips" are only 1/4" thick. The invoice would say 5-1/4" BS / 19mm offset however.
You can see where problems arise. If the person who purchased those HRE wheels didn't know about the 1/2" rule, he might tell his friend "my wheels are 8" wide on the front and I just measured the backspacing for you". "It's 5", so you should order the same because they're perfect"!