Not very efficient, but this brute force approach has the advantage of being very easy to code. data = {{a1, b1, c1}, {a2, b2, c2}, {a3, b3, c3}, {a4, b4, c4}, {a5, b5, c5}}; {aa, bb, cc} = Transpose @ data; as = Most @ Accumulate[aa]; bs = Most @ Sqrt @ Accumulate[bb^2]; cs = Table[ Module[{as = aa[[;; i]], cs = cc[[;; i]]}, cc[[i + 1]] Total[as]/(as.cs)], {i, Length @ cc - 1}] result = Transpose @ {as, bs, cs} > {{a1, Sqrt[b1^2], c2/c1}, {a1 + a2, Sqrt[b1^2 + b2^2], ((a1 + a2)*c3)/(a1*c1 + a2*c2)}, {a1 + a2 + a3, Sqrt[b1^2 + b2^2 + b3^2], ((a1 + a2 + a3)*c4)/(a1*c1 + a2*c2 + a3*c3)}, {a1 + a2 + a3 + a4, Sqrt[b1^2 + b2^2 + b3^2 + b4^2], ((a1 + a2 + a3 + a4)*c5)/(a1*c1 + a2*c2 + a3*c3 + a4*c4)}}