A 32 bit floating point number has 23 + 1 bits of mantissa and an 8 bit exponent (-126 to 127 is used though) so the largest number you can represent is:

(1 + 1 / 2 + ... 1 / (2 ^ 23)) * (2 ^ 127) = 
(2 ^ 23 + 2 ^ 23 + .... 1) * (2 ^ (127 - 23)) = 
(2 ^ 24 - 1) * (2 ^ 104) ~= 3.4e38
Answer from Andreas Brinck on Stack Overflow
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ c language โ€บ c-float-and-double
C Float and Double - GeeksforGeeks
July 23, 2025 - It can store values up to 7 decimal points without loss of precision. The format specifier for float is %f.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ cprogramming โ€บ c_data_types.htm
C - Data Types
CHAR_BIT : 8 CHAR_MAX : 127 CHAR_MIN : -128 INT_MAX : 2147483647 INT_MIN : -2147483648 LONG_MAX : 9223372036854775807 LONG_MIN : -9223372036854775808 SCHAR_MAX : 127 SCHAR_MIN : -128 SHRT_MAX : 32767 SHRT_MIN : -32768 UCHAR_MAX : 255 UINT_MAX : 4294967295 ULONG_MAX : 18446744073709551615 USHRT_MAX : 65535 ยท The following table provides the details of standard floating-point types with storage sizes and value ranges and their precision โˆ’
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ dotnet โ€บ csharp โ€บ language-reference โ€บ builtin-types โ€บ floating-point-numeric-types
Floating-point numeric types - C# reference | Microsoft Learn
January 20, 2026 - Each of the floating-point types has the MinValue and MaxValue constants that provide the minimum and maximum finite value of that type. The float and double types also provide constants that represent not-a-number and infinity values.
๐ŸŒ
Codefinity
codefinity.com โ€บ blog โ€บ Float-vs-Double
Float vs Double
The primary difference between float and double is the precision. Float is a single-precision float with about 7 decimal digits of precision and a range from approximately 1.4E-45 to 3.4E+38.
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ C_data_types
C data types - Wikipedia
1 week ago - The C language provides the four basic arithmetic type specifiers char, int, float and double (as well as the Boolean type bool), and the modifiers signed, unsigned, short, and long. The following table lists the permissible combinations in specifying a large set of storage size-specific declarations. ^ The standard term for the size of an integer type in bits is width. The width does not include padding bits. ^ a b c d e The minimal ranges [โˆ’(2nโˆ’1โˆ’1), 2nโˆ’1โˆ’1] (e.g.
Find elsewhere
๐ŸŒ
W3Resource
w3resource.com โ€บ c-programming โ€บ c-data-types.php
C Data Types - w3resource
August 19, 2022 - Ranges for integer data types in ...------------------------------------- flaot 1.175494e-38 3.402823e+38 double 2.225074e-308 1.797693e+308 long double 3.362103e-4932 1.189731e+4932...
๐ŸŒ
Quora
quora.com โ€บ How-do-we-find-the-range-of-a-float-in-C
How do we find the range of a float in C++? - Quora
Answer (1 of 2): This isnโ€™t really ... And these IEEE rules define the minimum and maximum values of a float to be minus infinity and plus infinity respectively. What do......
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ cpp โ€บ c-language โ€บ type-float
Type float | Microsoft Learn
The mantissa represents a number between 1.0 and 2.0. Since the high-order bit of the mantissa is always 1, it is not stored in the number. This representation gives a range of approximately 3.4E-38 to 3.4E+38 for type float.
๐ŸŒ
Quora
quora.com โ€บ What-are-the-exact-minimum-and-maximum-range-of-float-double-and-long-double-data-type-in-C
What are the exact minimum and maximum range of float, double, and long double data type in C? - Quora
Answer (1 of 3): > What are the exact minimum and maximum range of float, double, and long double data type in C? The ranges can vary from one implementation to another. The ISO C standard imposes minimal values for the bounds of the floating-point types (and the integer types), but implementati...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ c language โ€บ data-types-in-c
Data Types in C - GeeksforGeeks
Size: typically 4 bytes, Range: -2,147,483,648 to 2,147,483,647. Format specifier: %d. Format specifiers are the symbols that are used for printing and scanning values of given data types.
Published ย  3 weeks ago
๐ŸŒ
W3Schools
w3schools.com โ€บ c โ€บ ref_keyword_float.php
C float Keyword
C Examples C Real-Life Examples C Exercises C Quiz C Code Challenges C Compiler C Syllabus C Study Plan C Interview Q&A C Certificate ... The float keyword is a data type which stores fractional numbers.
๐ŸŒ
Scaler
scaler.com โ€บ home โ€บ topics โ€บ what is float in c++?
What is Float in C++? - Scaler Topics
June 19, 2024 - The float in C++ has a precision only up to the 7 digits, if we exceed its precision limit then it displays the garbage values after the precision limit. The range of float type in the C++ can represents values ranging from approximately
๐ŸŒ
Arduino
arduino.cc โ€บ en โ€บ Reference โ€บ float
float | Arduino Documentation
Arduino programming language can be divided in three main parts: functions, values (variables and constants), and structure.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ float vs double (c++)
r/learnprogramming on Reddit: float vs double (C++)
June 1, 2021 -

I am taking my first programming class, and I have done a few assignments, but Iโ€™m not clear on when to use float and when to use double? I know that float uses 4 bits and double uses 8 bits but Im just not sure about what situations call for which. (sorry if this is the wrong community for this question)

๐ŸŒ
Medium
medium.com โ€บ @Dev_Frank โ€บ datatypes-in-c-int-char-float-def790690c42
DATATYPES IN C (int, char, float) | by Dev Frank | Medium
February 5, 2024 - The size of a float variable is typically 4 bytes on most systems. It may vary depending on the compiler and platform. The range of a floating number is -3.4e38 to 3.4e38.
๐ŸŒ
W3Schools
w3schools.com โ€บ c โ€บ c_data_types.php
C Data Types
// Create variables int myNum = 5; // Integer (whole number) float myFloatNum = 5.99; // Floating point number char myLetter = 'D'; // Character // Print variables printf("%d\n", myNum); printf("%f\n", myFloatNum); printf("%c\n", myLetter); Try it Yourself ยป ยท
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ Floating-point_arithmetic
Floating-point arithmetic - Wikipedia
2 weeks ago - However, the behavior may not be the same as a rounding to the destination format due to a possible wider exponent range of the extended format. A floating-point number consists of two fixed-point components, whose range depends exclusively on the number of bits or digits in their representation.