丸め計算機
任意の小数点後の数に丸めます。
結果はタイプすると更新されます。
この計算機の情報
A rounding calculator rounds a number to a chosen number of decimal places (or significant figures) and shows four results side by side: the standard nearest-value rounding, always-up (ceiling), always-down (floor), and truncation, so you can compare every option at once.
Standard rounding looks at the digit just past the cut-off — 5 or more rounds up, less than 5 rounds down — so 3.14159 to two decimal places is 3.14. The other columns force a direction: for 2.673 the nearest and floor both give 2.67 while the ceiling gives 2.68, and truncation simply drops the extra digits to 2.67 without rounding. Switching the mode to significant figures counts meaningful digits from the first non-zero one instead, and a negative number of places rounds to the left of the point, so 3457 to −2 places becomes 3500.
Rounding matters for money, measurements, reporting to a sensible precision, and avoiding false accuracy in results. Seeing nearest, up, down and truncated together makes it clear how much a value shifts depending on which rule you apply.
よくある質問
小数点までの丸めはどういう仕組みですか?
Look at the digit just past the cut-off: 5 or more rounds up, less than 5 rounds down. 3.14159 to two places is 3.14.
小数点の負の数は何をするのですか。
これは小数点の左に丸められます。−1は最も近い10位、−2は最も近い100位に丸められます。3457から−2位は3500です。
丸め上げと丸め下げの違いは何ですか。
上方丸め (上限) は常に大きい値に移動し、下方丸め (下限) は常に小さい値に移動します。最近接値は最も近い値を選択します。例えば 2.673 は 2 桁の場合、最近接値と下方値は 2.67 になりますが、上方丸めは 2.68 になります。
切り離された結果は何を示すのか。
2.673 を小数点 2 位まで切り捨てると 2.67 になります。最近接丸めは 2.67 になりますが、 2.678 は 2.68 に丸めると 2.67 に切り捨てられます。
小数点以外の有効数字に丸めるにはどうしますか?
小数点以下の数字から有意数字にモードを切り替えます。精度が 3 なら、最初の 3 桁の有意数字を保持します。例えば 0.0045213 は 0.00452 になります。
丸めると数字が大きくなるの?
正の数のみ。丸めは正の無限に向かうことを意味します。つまり、−2.7 を整数に丸めると −2 になります。これは小さくなく大きい値です。
API — コードからこの計算機を使う
この計算機を自由な JSON エンドポイントとして呼び出します。鍵は必要ありません。下のフィールド値をクエリパラメータまたは JSON として送信してください。 省略したものは、このページに既に入力されているデフォルトと同じ値を使用します。未知のパラメータは 400 で、サイレンスゼロはありません。 API ドキュメントを読む →
エンドポイント
GET https://calculator.free/api/v1/rounding/
curl
curl "https://calculator.free/api/v1/rounding/?number=3.14159&places=2&mode=decimals"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/rounding/?" + new URLSearchParams({
"number": "3.14159",
"places": "2",
"mode": "decimals"
}));
const data = await r.json();
console.log(data.results);
結果は一般的な指導のための推定であり,財務的,医療的または税務的な助言ではない。