Numbers
Random Complex Number Generator
Used by developers, writers, and creators worldwide.
A random complex number generator built for mathematicians, engineers, and developers who need realistic test data fast. Complex numbers appear throughout AC circuit analysis, Fourier transforms, control theory, and quantum computing — and handwriting batches of them is slow and biased toward tidy values. This tool generates up to any count you need, with independent control over the real and imaginary ranges, decimal precision, and notation format. Switch between a+bi, a+bj, (a, b), or rectangular notation so output pastes directly into Python, MATLAB, LaTeX, or a spreadsheet without reformatting. Set asymmetric ranges — say ±50 real and ±5 imaginary — to model physically realistic signals rather than abstract test values.
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Set the Count field to the number of complex numbers you need in your batch.
- Enter the Real Part Range and Imaginary Part Range to define the ± boundary for each component.
- Choose Decimal Places to match the precision required by your use case or student exercise.
- Select the Notation style — a+bi for standard maths or a+bj for Python and electrical engineering.
- Click Generate, then copy the output list directly into your document, code, or spreadsheet.
Use Cases
- •Populating NumPy arrays with random phasor inputs to stress-test a Python DSP pipeline
- •Generating 50 complex impedance values for an RF circuit simulation in LTspice or MATLAB
- •Creating randomised exam questions on modulus, argument, and conjugates for a complex analysis course
- •Seeding a Jest test suite with edge-case complex numbers including negative imaginary parts and near-zero values
- •Building synthetic qubit amplitude datasets for testing a quantum algorithm prototype
Tips
- →Use asymmetric ranges — e.g. real ±5 and imaginary ±20 — to simulate antenna impedance values where reactance dominates resistance.
- →Set decimals to 0 and a small range like ±5 for clean integer-valued complex numbers ideal in student exam questions.
- →When testing a parser, generate one batch with 0 decimals and another with 5 decimals and concatenate them to cover both extremes.
- →For Python unit tests, switch to j-notation and paste the output directly inside a list literal — no manual reformatting needed.
- →To simulate conjugate pairs for filter design exercises, generate one batch and manually negate the imaginary parts in a second column.
- →Generating 50+ values with wide ranges helps reveal distribution bias or rounding bugs in code that processes complex inputs.
FAQ
what is the difference between i and j notation for complex numbers
Both represent the imaginary unit (√−1). Mathematicians and physicists write 'i', while electrical engineers write 'j' to avoid confusion with current. Python's built-in complex type also uses 'j', so switching this generator to j-notation lets you paste output like 3.2+1.7j directly into a Python script or NumPy array without editing.
how do I generate complex numbers for testing a parser in JavaScript or Python
Set your count to however many cases you need, crank decimal places to 5 or 6 to expose rounding bugs, and choose the notation your parser expects — a+bi for most math libraries, a+bj for Python. Negative imaginary parts (e.g. 4.3−2.1i) are included automatically, so you get the edge cases that hand-written test data usually misses.
can I control the range of real and imaginary parts independently
Yes. The real range and imaginary range sliders are fully independent, so you can model physically meaningful signals — for example ±100 for real (resistance) and ±10 for imaginary (reactance). The two parts are sampled uniformly with no correlation, giving an unbiased rectangular distribution across your defined region of the complex plane.