---
title: "What is the Difference between decimal, float and double in .NET?"  
description: "What is the Difference between decimal, float and double in .NET?"  
author: "Steilla Mitchel"  
published: 2023-07-19  
updated: 2023-07-19  
canonical: https://www.mindstick.com/forum/159154/what-is-the-difference-between-decimal-float-and-double-in-dot-net  
category: ".net"  
tags: [".net", "asp.net"]  
reading_time: 2 minutes  

---

# What is the Difference between decimal, float and double in .NET?

What is the [Difference between decimal](https://www.mindstick.com/forum/159575/difference-between-decimal-float-and-double-in-dot-net), [float](https://www.mindstick.com/interview/1718/describe-float-containment) and double in .NET?

## Replies

### Reply by Aryan Kumar

Sure, I can help you with that.

**[Decimal](https://www.mindstick.com/forum/34709/please-write-a-program-for-decimal-to-binary-conversion-in-c-sharp), float, and double** are all floating-point data types in C#. However, they have different precision and range.

**Precision** refers to the number of decimal places that a floating-point number can represent. **Range** refers to the possible values that a floating-point number can represent.

Here is a table that summarizes the key differences between decimal, float, and double in C#:

| Feature | Decimal | Float | Double |
| --- | --- | --- | --- |
| Precision | 128 bits | 32 bits | 64 bits |
| Range | ±1.0 × 10^-28 to ±7.9 × 10^28 | ±1.5 × 10^-45 to ±3.4 × 10^38 | ±5.0 × 10^-324 to ±1.7 × 10^308 |
| Use cases | Financial applications, where precision is important | General-purpose floating-point calculations | General-purpose floating-point calculations |

In general, **decimal** is the most precise floating-point data type in C#. It should be used for financial applications where precision is important.

**Float** is the least precise floating-point data type in C#. It should be used for general-purpose floating-point calculations where precision is not important.

**Double** is a good compromise between precision and range. It is the default floating-point data type in C#. It can be used for general-purpose floating-point calculations, but it is not as precise as decimal.

Here are some additional things to keep in mind about decimal, float, and double in C#:

1. Decimal is a 128-bit floating-point data type. This means that it can represent numbers with a precision of up to 128 decimal places.
2. Float is a 32-bit floating-point data type. This means that it can represent numbers with a precision of up to 7 decimal places.
3. Double is a 64-bit floating-point data type. This means that it can represent numbers with a precision of up to 15 decimal places.
4. Decimal is more efficient than float and double for calculations that require a high degree of precision.
5. Float is more efficient than double for calculations that do not require a high degree of precision.
6. Double is the most efficient floating-point data type for general-purpose calculations.


---

Original Source: https://www.mindstick.com/forum/159154/what-is-the-difference-between-decimal-float-and-double-in-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
