Family. All three share Lodash’s precision helper.
Compatibility
Browser & Runtime Support
_.ceil is a Lodash 4.x Math helper (since 3.10.0). It builds on native Math.ceil plus Lodash number coercion.
✓ Stable · Lodash 3.10.0+
_.ceil()
Available in [email protected] full builds and the lodash/ceil modular import. Works in evergreen browsers and Node / Bun / Deno when Lodash is installed.
100%With Lodash 4.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.ceilLodash 4.x+
Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import ceil from "lodash/ceil" for smaller builds.
Frequently Asked Questions
_.ceil(number, [precision=0]) rounds number up (toward +Infinity) to the given precision. With precision 0 it matches Math.ceil for finite numbers.
Positive precision keeps that many decimal places (rounded up). Negative precision rounds up to tens (−1), hundreds (−2), and so on — e.g. _.ceil(6040, -2) → 6100.
ceil always rounds toward +Infinity. floor rounds toward −Infinity. round goes to the nearest value (ties away from zero in Lodash’s Math.round path).
Yes. _.ceil(-4.1) → -4 because -4 is greater than -4.1 (toward +Infinity).
Yes. The value is passed through toNumber, so _.ceil('4.2') → 5. Non-numeric strings become NaN.
Use import ceil from "lodash/ceil" or require("lodash/ceil") for tree-shaking. Full build: import _ from "lodash" then _.ceil.