---
title: "Discussion on \"How to choose Math.ceil and Math.floor correctly\" | Hashnode"
description: "Discussion on \"How to choose Math.ceil and Math.floor correctly\". Many times we want to calculate something by dividing operations.But we might get a float value as a result, for example, 5 / 2 = 2.5.\nIn javascript, we have Math.ceil and Math.floor method to use. They have a huge difference from each other.\nThe Mat..."
url: "https://hashnode.com/posts/how-to-choose-mathceil-and-mathfloor-correctly/647609ca087a143589e18e55"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to choose Math.ceil and Math.floor correctly](https://ubuntumeta.hashnode.dev/how-to-choose-mathceil-and-mathfloor-correctly?utm_source=hashnode&utm_medium=feed)

Many times we want to calculate something by dividing operations.But we might get a float value as a result, for example, 5 / 2 = 2.5. In javascript, we have Math.ceil and Math.floor method to use. They have a huge difference from each other. The Mat...

May 30, 2023 · 1 min read · ubuntumeta.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Ubuntu Tang](https://hashnode.com/@UbuntuMeta)

@UbuntuMeta · Califoria, US

  
[View profile](https://hashnode.com/@UbuntuMeta)

Dev

A developer for fullstack.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
