 <p>I'm reasonably certain nothing built into iostreams supports this directly.</p> <p>I think the cleanest way to handle it is to round the number before passing it to an iostream to be printed out:</p> <pre><code>#include &lt;iostream&gt; #include &lt;vector&gt; #include &lt;cmath&gt; double rounded(double in, int places) { double factor = std::pow(10, places); return std::round(in * factor) / factor; } int main() { std::vector&lt;double&gt; values{ 0.000000095123, 0.0095123, 0.95, 0.95123 }; for (auto i : values) std::cout &lt;&lt; "value = " &lt;&lt; 100. * rounded(i, 5) &lt;&lt; "%\n"; } </code></pre> <p>Due to the way it does rounding, this has a limitation on the magnitude of numbers it can work with. For percentages this probably isn't an issue, but <em>if</em> you were working with a number close to the largest that can be represented in the type in question (<code>double</code> in this case) the multiplication by <code>pow(10, places)</code> could/would overflow and produce bad results.</p> <p>Though I can't be <em>absolutely</em> certain, it doesn't seem like this would be likely to cause an issue for the problem you seem to be trying to solve.</p>