Here is a working fiddle: http://jsfiddle.net/jearles/VmZLZ/6/
The key is to have both the read and write of the writable computed reference the other observable field. When you read the computed it calculates from the "master" field, and when you write to the computed it re-calculates the "master" field.
--
function weightModel() {
var self = this;
var weight = 180;
self.weight = ko.observable(weight.toFixed(2));
self.weightKG = ko.computed({
read: function() {
return !isNaN(self.weight()) ?
(self.weight() / 2.2).toFixed(2) : undefined;
},
write: function(newValue) {
var pd_weight = !isNaN(newValue) ?
(parseFloat(newValue) * 2.2).toFixed(2) : undefined;
self.weight(pd_weight);
}
});
}
ko.applyBindings(new weightModel());